emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106153: * lisp/vc/vc.el (vc-next-act


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106153: * lisp/vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781)
Date: Thu, 20 Oct 2011 17:01:45 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106153
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2011-10-20 17:01:45 -0400
message:
  * lisp/vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781)
modified:
  lisp/ChangeLog
  lisp/vc/vc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-10-20 01:40:32 +0000
+++ b/lisp/ChangeLog    2011-10-20 21:01:45 +0000
@@ -1,3 +1,7 @@
+2011-10-20  Glenn Morris  <address@hidden>
+
+       * vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781)
+
 2011-10-20  Christoph Scholtes  <address@hidden>
 
        * emulation/cua-base.el (cua-set-mark): Fix case of string.

=== modified file 'lisp/vc/vc.el'
--- a/lisp/vc/vc.el     2011-10-18 06:52:32 +0000
+++ b/lisp/vc/vc.el     2011-10-20 21:01:45 +0000
@@ -1120,9 +1120,13 @@
      ;; 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"))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]