[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

M.7.5.1 Registering a File for Version Control

You can put any file under version control by simply visiting it, and then typing C-x v i (vc-register).

C-x v i
Register the visited file for version control.

To register the file, Emacs must choose which version control system to use for it. If the file's directory already contains files registered in a version control system, Emacs uses that system. If there is more than one system in use for a directory, Emacs uses the one that appears first in vc-handled-backends (see section M.7.10 Customizing VC). On the other hand, if there are no files already registered, Emacs uses the first system from vc-handled-backends that could register the file--for example, you cannot register a file under CVS if its directory is not already part of a CVS tree.

With the default value of vc-handled-backends, this means that Emacs uses RCS if there are any files under RCS control, CVS if there are any files under CVS, SCCS if any files are under SCCS, or RCS as the ultimate default.

If locking is in use, C-x v i leaves the file unlocked and read-only. Type C-x C-q if you wish to start editing it. After registering a file with CVS, you must subsequently commit the initial version by typing C-x C-q.

The initial version number for a newly registered file is 1.1, by default. You can specify a different default by setting the variable vc-default-init-version, or you can give C-x v i a numeric argument; then it reads the initial version number for this particular file using the minibuffer.

If vc-initial-comment is non-nil, C-x v i reads an initial comment to describe the purpose of this source file. Reading the initial comment works like reading a log entry (see section M.7.3.4 Features of the Log Entry Buffer).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 2, 2002 using texi2html