unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10589: 24.0.92; vc-register; use deduced backend for checking registered
@ 2012-01-24  2:35 OKAZAKI Tetsurou
  2012-11-30  4:45 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: OKAZAKI Tetsurou @ 2012-01-24  2:35 UTC (permalink / raw)
  To: 10589


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






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#10589: 24.0.92; vc-register; use deduced backend for checking registered
  2012-01-24  2:35 bug#10589: 24.0.92; vc-register; use deduced backend for checking registered OKAZAKI Tetsurou
@ 2012-11-30  4:45 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2012-11-30  4:45 UTC (permalink / raw)
  To: OKAZAKI Tetsurou; +Cc: 10589-done

OKAZAKI Tetsurou <okazaki.tetsurou@gmail.com> writes:

> 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.

I've committed your patch to trunk.  Thanks.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-30  4:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-24  2:35 bug#10589: 24.0.92; vc-register; use deduced backend for checking registered OKAZAKI Tetsurou
2012-11-30  4:45 ` Chong Yidong

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).