Commit 967bf297 authored by Glenn Morris's avatar Glenn Morris
Browse files

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

parent 59e9dbbc
2008-02-24 Glenn Morris <rgm@gnu.org> 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'). * vc-mcvs.el (vc-mcvs-register): Fix let-binding (for use of `file').
   
2008-02-24 Dan Nicolaescu <dann@ics.uci.edu> 2008-02-24 Dan Nicolaescu <dann@ics.uci.edu>
......
...@@ -298,15 +298,18 @@ COMMENT can be used to provide an initial description of FILES. ...@@ -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 `vc-register-switches' and `vc-cvs-register-switches' are passed to
the CVS command (in that order)." the CVS command (in that order)."
(when (and (not (vc-cvs-responsible-p file)) ;; Register the directories if needed.
(vc-cvs-could-register file)) (let (dirs)
;; Register the directory if needed. (dolist (file files)
(vc-cvs-register (directory-file-name (file-name-directory file)))) (and (not (vc-cvs-responsible-p file))
(apply 'vc-cvs-command nil 0 files (vc-cvs-could-register file)
"add" (push (directory-file-name (file-name-directory file)) dirs)))
(and comment (string-match "[^\t\n ]" comment) (if dirs (vc-cvs-register dirs)))
(concat "-m" comment)) (apply 'vc-cvs-command nil 0 files
(vc-switches 'CVS 'register))) "add"
(and comment (string-match "[^\t\n ]" comment)
(concat "-m" comment))
(vc-switches 'CVS 'register)))
(defun vc-cvs-responsible-p (file) (defun vc-cvs-responsible-p (file)
"Return non-nil if CVS thinks it is responsible for FILE." "Return non-nil if CVS thinks it is responsible for FILE."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment