Function: vc-cvs-register

vc-cvs-register is a byte-compiled function defined in vc-cvs.el.gz.

Signature

(vc-cvs-register FILES &optional COMMENT)

Documentation

Register FILES into the CVS version-control system.

COMMENT can be used to provide an initial description of FILES. Passes either vc-cvs-register-switches or vc-register-switches to the CVS command.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-cvs.el.gz
(defun vc-cvs-register (files &optional comment)
  "Register FILES into the CVS version-control system.
COMMENT can be used to provide an initial description of FILES.
Passes either `vc-cvs-register-switches' or `vc-register-switches'
to the CVS command."
  ;; 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)))