]> git.eshelyaron.com Git - emacs.git/commitdiff
vc.el fix for bug#6146.
authorGlenn Morris <rgm@gnu.org>
Mon, 7 Mar 2011 08:56:30 +0000 (00:56 -0800)
committerGlenn Morris <rgm@gnu.org>
Mon, 7 Mar 2011 08:56:30 +0000 (00:56 -0800)
* lisp/vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt.
Give an explicit error if failed to make writable.

lisp/ChangeLog
lisp/vc/vc.el

index effb2a3038af00b95d0875b6b1136e35cf0668ec..4ff65b16c6d9acdface4deab9c1104818e9deacc 100644 (file)
@@ -1,6 +1,7 @@
 2011-03-07  Glenn Morris  <rgm@gnu.org>
 
        * vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt.
+       Give an explicit error if failed to make writable.  (Bug#6146)
 
 2011-03-07  Ed Reingold  <reingold@emr.cs.iit.edu>
 
index 2fb397ed6f8b31b0542be2e0b071e721056a1d8f..7f55ffdbdad9331833b31481ec199f9e8fb7b252 100644 (file)
@@ -1117,7 +1117,10 @@ merge in the changes into your working copy."
            ;; 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"))
-           (set-file-modes file (logior (file-modes file) 128))
+            ;; Maybe we somehow lost permissions on the directory.
+            (condition-case nil
+                (set-file-modes file (logior (file-modes file) 128))
+              (error (error "Unable to make file writable")))
            (let ((visited (get-file-buffer file)))
              (when visited
                (with-current-buffer visited