Previous: Advanced C-x v v, Up: Basic VC Editing
When you check in changes, Emacs pops up a buffer called ‘*VC-Log*’ for you to enter a log entry.
After you have finished editing the log message, type C-c C-c to exit the buffer and commit the change.
In the ‘*VC-Log*’ buffer, typing C-c C-f
(log-edit-show-files) displays a list of files in the VC
fileset you are committing. If you called C-x v v directly from
a work file, the VC fileset consists of that single file, so this
command is not very useful. If you called C-x v v from a VC
directory buffer, the VC fileset may consist of multiple files
(see VC Directory Mode).
Type C-c C-d (log-edit-show-diff) to show a “diff” of
the changes you have made (i.e., the differences between the work file
and the repository revision from which you started editing the file).
The diff is displayed in a special buffer in another window.
See Comparing Files.
If you have written an entry in the ChangeLog (see Change Log), type C-c C-a (log-edit-insert-changelog) to pull
it into the ‘*VC-Log*’ buffer. If the topmost item in the
ChangeLog was made under your user name on the current date,
this command searches that item for entries that match the file(s) to
be committed; if found, these entries are inserted.
See Change Logs and VC,
for the opposite way of working—generating ChangeLog entries from
the revision control log.
To abort a check-in, just don't type C-c C-c in that buffer. You can switch buffers and do other editing. As long as you don't try to check in another file, the entry you were editing remains in the ‘*VC-Log*’ buffer, and you can go back to that buffer at any time to complete the check-in.
If you change several source files for the same reason, it is often convenient to specify the same log entry for many of the files. (This is the normal way to do things on a changeset-oriented system, where comments are attached to changesets rather than the history of individual files.) The most convenient way to do this is to mark all the files in VC Directory Mode and check in from there; the log buffer will carry the fileset information with it and do a group commit when you type C-c C-c.
You can also browse the history of previous log entries to duplicate a checkin comment. This can be useful when you want several files to have checkin comments that vary only slightly from each other. The commands M-n, M-p, M-s and M-r for doing this work just like the minibuffer history commands (except that these versions are used outside the minibuffer).
Each time you check in a change, the log entry buffer is put into VC
Log Edit mode, which involves running two hooks: text-mode-hook
and vc-log-mode-hook. See Hooks.