;; * working-revision (file)
;;
;; Return the working revision of FILE. This is the revision fetched
-;; by the last checkout or upate, not necessarily the same thing as the
+;; by the last checkout or update, not necessarily the same thing as the
;; head or tip revision. Should return "0" for a file added but not yet
;; committed.
;;
:type 'boolean
:group 'vc)
+(make-obsolete-variable 'vc-initial-comment "it has no effect." "23.2")
+
(defcustom vc-default-init-revision "1.1"
"A string used as the default revision number when a new file is registered.
This can be overridden by giving a prefix argument to \\[vc-register]. This
;; Files have local changes
((vc-compatible-state state 'edited)
(let ((ready-for-commit files))
- ;; If files are edited but read-only, give user a chance to correct
+ ;; If files are edited but read-only, give user a chance to correct.
(dolist (file files)
- (unless (file-writable-p file)
+ ;; If committing a mix of removed and edited files, the
+ ;; fileset has state = 'edited. Rather than checking the
+ ;; state of each individual file in the fileset, it seems
+ ;; simplest to just check if the file exists. Bug#9781.
+ (when (and (file-exists-p file) (not (file-writable-p file)))
;; Make the file+buffer read-write.
(unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file))
(error "Aborted"))
(if (= nfiles 1) "" "s"))))))
(error "Revert canceled")))
(when diff-buffer
- (delete-windows-on diff-buffer)
- (kill-buffer diff-buffer)))
+ (quit-windows-on diff-buffer t)))
(dolist (file files)
(message "Reverting %s..." (vc-delistify files))
(vc-revert-file file)
;; Display changes
(unless (yes-or-no-p "Discard these revisions? ")
(error "Rollback canceled"))
- (delete-windows-on "*vc-diff*")
- (kill-buffer"*vc-diff*")
+ (quit-windows-on "*vc-diff*" t)
;; Do the actual reversions
(message "Rolling back %s..." (vc-delistify files))
(with-vc-properties
(substring rev 0 index))))
(defun vc-default-responsible-p (backend file)
- "Indicate whether BACKEND is reponsible for FILE.
+ "Indicate whether BACKEND is responsible for FILE.
The default is to return nil always."
nil)