diff options
| author | OKAZAKI Tetsurou | 2012-11-30 12:44:52 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-11-30 12:44:52 +0800 |
| commit | 171b09490b57815f4c0aeec32ff2a049f6a67393 (patch) | |
| tree | b96b0d7b9f185486f822683ef14fc8a501dcea38 | |
| parent | 21859ebcafcda497a086a9db4701f0406db599ef (diff) | |
| download | emacs-171b09490b57815f4c0aeec32ff2a049f6a67393.tar.gz emacs-171b09490b57815f4c0aeec32ff2a049f6a67393.zip | |
Relax existing-registration check in vc-register (tiny change).
* vc/vc.el (vc-register): Allow registering a file which is already
registered with a different backend.
Fixes: debbugs:10589
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 73a58600ba2..6c96213a71f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-11-30 OKAZAKI Tetsurou <okazaki.tetsurou@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * vc/vc.el (vc-register): Allow registering a file which is | ||
| 4 | already registered with a different backend (Bug#10589). | ||
| 5 | |||
| 1 | 2012-11-29 Jambunathan K <kjambunathan@gmail.com> | 6 | 2012-11-29 Jambunathan K <kjambunathan@gmail.com> |
| 2 | Stefan Monnier <monnier@iro.umontreal.ca> | 7 | Stefan Monnier <monnier@iro.umontreal.ca> |
| 3 | 8 | ||
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index a909aca5bca..0224211e6cf 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1271,12 +1271,10 @@ first backend that could register the file is used." | |||
| 1271 | ;; many VCS allow that as well. | 1271 | ;; many VCS allow that as well. |
| 1272 | (dolist (fname files) | 1272 | (dolist (fname files) |
| 1273 | (let ((bname (get-file-buffer fname))) | 1273 | (let ((bname (get-file-buffer fname))) |
| 1274 | (unless fname (setq fname buffer-file-name)) | 1274 | (unless fname |
| 1275 | (when (vc-backend fname) | 1275 | (setq fname buffer-file-name)) |
| 1276 | (if (vc-registered fname) | 1276 | (when (vc-call-backend backend 'registered fname) |
| 1277 | (error "This file is already registered") | 1277 | (error "This file is already registered")) |
| 1278 | (unless (y-or-n-p "Previous master file has vanished. Make a new one? ") | ||
| 1279 | (error "Aborted")))) | ||
| 1280 | ;; Watch out for new buffers of size 0: the corresponding file | 1278 | ;; Watch out for new buffers of size 0: the corresponding file |
| 1281 | ;; does not exist yet, even though buffer-modified-p is nil. | 1279 | ;; does not exist yet, even though buffer-modified-p is nil. |
| 1282 | (when bname | 1280 | (when bname |