Function: vc-checkin

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

Signature

(vc-checkin FILES BACKEND &optional COMMENT INITIAL-CONTENTS REV)

Documentation

Check in FILES. COMMENT is a comment string; if omitted, a buffer is popped up to accept a comment. If INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial contents of the log entry buffer. The optional argument REV may be a string specifying the new revision level (only supported for some older VCSes, like RCS and CVS).

Runs the normal hooks vc-before-checkin-hook and vc-checkin-hook.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
(defun vc-checkin (files backend &optional comment initial-contents rev)
  "Check in FILES. COMMENT is a comment string; if omitted, a
buffer is popped up to accept a comment.  If INITIAL-CONTENTS is
non-nil, then COMMENT is used as the initial contents of the log
entry buffer.
The optional argument REV may be a string specifying the new revision
level (only supported for some older VCSes, like RCS and CVS).

Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'."
  (run-hooks 'vc-before-checkin-hook)
  (vc-start-logentry
   files comment initial-contents
   "Enter a change comment."
   "*vc-log*"
   (lambda ()
     (vc-call-backend backend 'log-edit-mode))
   (lambda (files comment)
     (message "Checking in %s..." (vc-delistify files))
     ;; "This log message intentionally left almost blank".
     ;; RCS 5.7 gripes about white-space-only comments too.
     (or (and comment (string-match "[^\t\n ]" comment))
         (setq comment "*** empty log message ***"))
     (with-vc-properties
         files
       ;; We used to change buffers to get local value of
       ;; vc-checkin-switches, but 'the' local buffer is
       ;; not a well-defined concept for filesets.
       (progn
         (vc-call-backend backend 'checkin files comment rev)
         (mapc #'vc-delete-automatic-version-backups files))
       `((vc-state . up-to-date)
         (vc-checkout-time . ,(file-attribute-modification-time
			       (file-attributes file)))
         (vc-working-revision . nil)))
     (message "Checking in %s...done" (vc-delistify files)))
   'vc-checkin-hook
   backend))