diff options
| author | Glenn Morris | 2011-10-20 17:01:45 -0400 |
|---|---|---|
| committer | Glenn Morris | 2011-10-20 17:01:45 -0400 |
| commit | 516eddb0513bf9c1e4e4c1e25509953d4b8f935c (patch) | |
| tree | 16eb4cb1189c8d54abd282ec75769c134cc9efa6 | |
| parent | 55622b93c90579fc63a72912733e20318d168071 (diff) | |
| download | emacs-516eddb0513bf9c1e4e4c1e25509953d4b8f935c.tar.gz emacs-516eddb0513bf9c1e4e4c1e25509953d4b8f935c.zip | |
* lisp/vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781)
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 448b07edec2..e18fdaec0bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-10-20 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781) | ||
| 4 | |||
| 1 | 2011-10-20 Christoph Scholtes <cschol2112@googlemail.com> | 5 | 2011-10-20 Christoph Scholtes <cschol2112@googlemail.com> |
| 2 | 6 | ||
| 3 | * emulation/cua-base.el (cua-set-mark): Fix case of string. | 7 | * 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." | |||
| 1120 | ;; Files have local changes | 1120 | ;; Files have local changes |
| 1121 | ((vc-compatible-state state 'edited) | 1121 | ((vc-compatible-state state 'edited) |
| 1122 | (let ((ready-for-commit files)) | 1122 | (let ((ready-for-commit files)) |
| 1123 | ;; If files are edited but read-only, give user a chance to correct | 1123 | ;; If files are edited but read-only, give user a chance to correct. |
| 1124 | (dolist (file files) | 1124 | (dolist (file files) |
| 1125 | (unless (file-writable-p file) | 1125 | ;; If committing a mix of removed and edited files, the |
| 1126 | ;; fileset has state = 'edited. Rather than checking the | ||
| 1127 | ;; state of each individual file in the fileset, it seems | ||
| 1128 | ;; simplest to just check if the file exists. Bug#9781. | ||
| 1129 | (when (and (file-exists-p file) (not (file-writable-p file))) | ||
| 1126 | ;; Make the file+buffer read-write. | 1130 | ;; Make the file+buffer read-write. |
| 1127 | (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file)) | 1131 | (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file)) |
| 1128 | (error "Aborted")) | 1132 | (error "Aborted")) |