From: OKAZAKI Tetsurou <okazaki.tetsurou@gmail.com>
To: 10589@debbugs.gnu.org
Subject: bug#10589: 24.0.92; vc-register; use deduced backend for checking registered
Date: Tue, 24 Jan 2012 11:35:52 +0900 [thread overview]
Message-ID: <86boptg73r.wl%%5253605f36527b613438407bc85287410830e04c@gmail.com> (raw)
Current implementation of `vc-register' fails to register an unregistered item
which is already registered to another backend.
Using `vc-call-backend' with deduced `backend' instead of `vc-backend' and
`vc-registered' resolves this issue.
=== modified file 'lisp/vc/vc.el'
*** lisp/vc/vc.el 2012-01-19 07:21:25 +0000
--- lisp/vc/vc.el 2012-01-20 19:55:38 +0000
*************** first backend that could register the fi
*** 1277,1287 ****
(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"))))
;; Watch out for new buffers of size 0: the corresponding file
;; does not exist yet, even though buffer-modified-p is nil.
(when bname
--- 1277,1284 ----
(dolist (fname files)
(let ((bname (get-file-buffer fname)))
(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
next reply other threads:[~2012-01-24 2:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 2:35 OKAZAKI Tetsurou [this message]
2012-11-30 4:45 ` bug#10589: 24.0.92; vc-register; use deduced backend for checking registered Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86boptg73r.wl%%5253605f36527b613438407bc85287410830e04c@gmail.com \
--to=okazaki.tetsurou@gmail.com \
--cc=10589@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).