1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00

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
This commit is contained in:
OKAZAKI Tetsurou 2012-11-30 12:44:52 +08:00 committed by Chong Yidong
parent 21859ebcaf
commit 171b09490b
2 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2012-11-30 OKAZAKI Tetsurou <okazaki.tetsurou@gmail.com> (tiny change)
* vc/vc.el (vc-register): Allow registering a file which is
already registered with a different backend (Bug#10589).
2012-11-29 Jambunathan K <kjambunathan@gmail.com>
Stefan Monnier <monnier@iro.umontreal.ca>

View File

@ -1271,12 +1271,10 @@ first backend that could register the file is used."
;; many VCS allow that as well.
(dolist (fname files)
(let ((bname (get-file-buffer fname)))
(unless fname (setq fname buffer-file-name))
(when (vc-backend fname)
(if (vc-registered fname)
(error "This file is already registered")
(unless (y-or-n-p "Previous master file has vanished. Make a new one? ")
(error "Aborted"))))
(unless fname
(setq fname buffer-file-name))
(when (vc-call-backend backend 'registered fname)
(error "This file is already registered"))
;; Watch out for new buffers of size 0: the corresponding file
;; does not exist yet, even though buffer-modified-p is nil.
(when bname