ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial
Web Hosting by 1&1
32.1.6.2 VC Change Log
C-x v l
Display revision control state and change history (vc-print-log).
C-x v L
Display the change history for the current repository (vc-print-root-log).
C-x v I
Display the changes that will be received with a pull operation (vc-log-incoming).
C-x v O
Display the changes that will be sent by the next push operation (vc-log-outgoing).

The command C-x v l (vc-print-log) displays a buffer named ‘*vc-change-log*’ in a new window. This buffer lists the changes to the current file, including the associated log entries. (These are the log entries associated with the version control system, i.e. the ones you enter via the ‘*VC-Log*’ buffer. See Log Buffer.) Point is centered at the revision of the file currently being visited. With a prefix argument, the command prompts for the revision to center on, and the maximum number of revisions to display. You can call this command from a Dired buffer (see Dired).

Type C-x v L (vc-print-root-log) to display a ‘*vc-change-log*’ buffer showing the history of the version-controlled directory tree as a whole. With a prefix argument, the command prompts for the maximum number of revisions to display. RCS, SCCS, and CVS do not support this feature.

On a distributed version control system, the C-x v I (vc-log-incoming) command displays a log buffer showing the changes that will be applied, the next time you run the version control system's “pull” command to get new revisions from another repository. This other repository is the default one from which changes are pulled, as defined by the version control system; with a prefix argument, vc-log-incoming prompts for a specific repository from which changes would be pulled, and lists the changes accordingly. Similarly, C-x v O (vc-log-outgoing) shows the changes that will be sent to another repository, the next time you run the “push” command; with a prefix argument, it prompts for a specific repository to which changes would be pushed.

In the ‘*vc-change-log*’ buffer, you can use the following keys to move between the logs of revisions and of files, to view past revisions, to modify change comments, to view annotations and to view diffs:

p
Move to the previous revision-item in the buffer. (Revision entries in the log buffer are usually in reverse-chronological order, so the previous revision-item usually corresponds to a newer revision.) A numeric prefix argument is a repeat count.
n
Move to the next revision-item (which most often corresponds to the previous revision of the file). A numeric prefix argument is a repeat count.
P
Move to the log of the previous file, when the logs of multiple files are in the log buffer (see VC Directory Mode). Otherwise, just move to the beginning of the log. A numeric prefix argument is a repeat count, so C-u 10 P would move backward 10 files.
N
Move to the log of the next file, when the logs of multiple files are in the log buffer (see VC Directory Mode). It also takes a numeric prefix argument as a repeat count.
a
Annotate the revision indicated by the current line.
e
Modify the change comment displayed at point. Note that not all VC systems support modifying change comments.
f
Visit the revision indicated at the current line, like typing C-x v ~ and specifying this revision's ID (see Old Revisions).
d
Display the diff (see Comparing Files) between the revision indicated at the current line and the next earlier revision. This is useful to see what actually changed in the file when the revision indicated on the current line was committed.
D
Display the changeset diff (see Comparing Files) between the revision indicated at the current line and the next earlier revision. This is useful to see all the changes to all files that the revision indicated on the current line did when it was committed.

Because fetching many log entries can be slow, the ‘*vc-change-log*’ buffer displays no more than 2000 revisions by default. The variable vc-log-show-limit specifies this limit; if you set the value to zero, that removes the limit. You can also increase the number of revisions shown in an existing ‘*vc-change-log*’ buffer by clicking on the ‘Show 2X entries’ or ‘Show unlimited entries’ buttons at the end of the buffer. However, RCS, SCCS, and CVS do not support this feature.

blog comments powered by Disqus