vc.el fix for bug#6146.

* 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.
This commit is contained in:
Glenn Morris 2011-03-07 00:56:30 -08:00
parent 619f4b625e
commit 7e319d3cc3
2 changed files with 5 additions and 1 deletions

View 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>

View 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