From: Glenn Morris Date: Thu, 20 Oct 2011 21:01:45 +0000 (-0400) Subject: * lisp/vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781) X-Git-Tag: emacs-pretest-24.0.91~53 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=516eddb0513bf9c1e4e4c1e25509953d4b8f935c;p=emacs.git * lisp/vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 448b07edec2..e18fdaec0bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-10-20 Glenn Morris + + * vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781) + 2011-10-20 Christoph Scholtes * emulation/cua-base.el (cua-set-mark): Fix case of string. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index cdc4f155083..909585138fc 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1120,9 +1120,13 @@ merge in the changes into your working copy." ;; 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"))