1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-30 11:09:23 +00:00

(vc-cvs-register): Fix registering of directories in multiple file case.

This commit is contained in:
Glenn Morris 2008-02-24 22:54:30 +00:00
parent 59e9dbbc63
commit 967bf29791
2 changed files with 15 additions and 9 deletions

View File

@ -1,5 +1,8 @@
2008-02-24 Glenn Morris <rgm@gnu.org>
* vc-cvs.el (vc-cvs-register): Fix registering of directories in
multiple file case.
* vc-mcvs.el (vc-mcvs-register): Fix let-binding (for use of `file').
2008-02-24 Dan Nicolaescu <dann@ics.uci.edu>

View File

@ -298,15 +298,18 @@ COMMENT can be used to provide an initial description of FILES.
`vc-register-switches' and `vc-cvs-register-switches' are passed to
the CVS command (in that order)."
(when (and (not (vc-cvs-responsible-p file))
(vc-cvs-could-register file))
;; Register the directory if needed.
(vc-cvs-register (directory-file-name (file-name-directory file))))
(apply 'vc-cvs-command nil 0 files
"add"
(and comment (string-match "[^\t\n ]" comment)
(concat "-m" comment))
(vc-switches 'CVS 'register)))
;; Register the directories if needed.
(let (dirs)
(dolist (file files)
(and (not (vc-cvs-responsible-p file))
(vc-cvs-could-register file)
(push (directory-file-name (file-name-directory file)) dirs)))
(if dirs (vc-cvs-register dirs)))
(apply 'vc-cvs-command nil 0 files
"add"
(and comment (string-match "[^\t\n ]" comment)
(concat "-m" comment))
(vc-switches 'CVS 'register)))
(defun vc-cvs-responsible-p (file)
"Return non-nil if CVS thinks it is responsible for FILE."