The O'Reilly Learning GNU Emacs book has a good chapter on using version control in emacs.In general, the VC (version control) commands are
C-x vfollowed by one command character.Be sure your CVSROOT environment variable is set correctly before starting emacs.
Sometimes emacs opens a cvs-controlled file in Read Only mode. Kai Wu figured out what's going on
Action How to do it Add a new file to the repository Create the File. Save it
C-x v i
(this adds the file, but doesn't commit it)
C-x v v
Enter the "Initial Revision" comment
C-c C-cRevert a buffer to the last revision C-x v uSee differences between buffer and last revision C-x v =See differences between two revisions C-u C-x v =
You'll be prompted for file, starting revision, and ending revision.
Specify the revisions either by revision number or by label.Retreive a given revision in another window C-x v ~
You'll be prompted for a revisionSee revision history C-x v l
(That's an "ell")
Label a tree C-x v sYou'll be prompted for a label nameRetreive file names from a labeled snapshot C-x v r
You'll be prompted for a label name.
This checks out every registered file underneath the current directory, which might not be what you want to do.Do a Bulk Check-in C-x v d
Mark files to be checked in. (like in DirEd, move the cursor to the name and typem)
C-x v v
Enter the revision comment. Note that this will put the same revision comment on all checked-in files, so be sure that the comment really applies to all of the files.
Keystroke What it does C-x v iRegister a file for version control
Bound tovc-registerC-x v vCommits a modified file that's already been registered for version control. Use
C-c C-c
to save the revision comment and commit the change.
Bound tovc-next-actionC-x v uRevert a buffer to the last revision
Bound tovc-revert-bufferC-x v =See differences between buffer and last revision.
Bound tovc-diffC-u C-x v =See differences between two revisions of a file.
You'll be prompted for file, starting revision, and ending revision.
Specify the revision s either by revision number or by label.
Bound tovc-diffC-x v ~Retreive a given revision in another window.
You'll be prompted for the a revision
Bound tovc-version-other-windowC-x v l(that's an "ell")
See revision history
Bound tovc-print-logC-x v sLabel a tree (a.k.a. Creating a snapshot)
You'll be prompted for a label name
Bound tovc-create-snapshotC-x v rRetreive file names from a labeled snapshot
You'll be prompted for a label name.
This checks out every registered file underneath the current directory, which might not be what you want to do.
Bound tovc-retreive-snapshotC-x v dBring up a dired-style directory listing
Mark files for check-in by usingm
Actually check things in with
C-x v v
$Id: emacs.html,v 1.2 1999/12/23 21:49:09 markd Exp $