Emacs normally does not save backup files for source files that are
maintained with version control. If you want to make backup files even
for files that use version control, set the variable
vc-make-backup-files
to a non-nil
value.
Normally the work file exists all the time, whether it is locked or
not. If you set vc-keep-workfiles
to nil
, then checking
in a new version with C-x C-q deletes the work file; but any
attempt to visit the file with Emacs creates it again. (With CVS, work
files are always kept.)
If vc-suppress-confirm
is non-nil
, then C-x C-q
and C-x v i can save the current buffer without asking, and
C-x v u also operates without asking for confirmation. (This
variable does not affect C-x v c; that operation is so drastic
that it should always ask for confirmation.)
VC mode does much of its work by running the shell commands for RCS,
CVS and SCCS. If vc-command-messages
is non-nil
, VC
displays messages to indicate which shell commands it runs, and
additional messages when the commands finish.
When deducing the locked/unlocked state of a file, VC first looks for an RCS version header string in the file (see section Inserting Version Control Headers). If there is no header string (or if the backend system is SCCS), VC normally looks at the file permissions of the work file; this is fast. But there might be situations when the file permissions cannot be trusted. In this case the master file has to be consulted, which is rather expensive. Also the master file can only tell you if there's any lock on the file, but not whether your work file really contains that locked version.
You can tell VC not to use version headers to determine lock status by
setting vc-consult-headers
to nil
. VC then always uses
the file permissions (if it can trust them), or else checks the master
file.
You can specify the criterion for whether to trust the file
permissions by setting the variable vc-mistrust-permissions
. Its
value may be t
(always mistrust the file permissions and check
the master file), nil
(always trust the file permissions), or a
function of one argument which makes the decision. The argument is the
directory name of the `RCS', `CVS' or `SCCS'
subdirectory. A non-nil
value from the function says to mistrust
the file permissions. If you find that the file permissions of work
files are changed erroneously, set vc-mistrust-permissions
to
t
. Then VC always checks the master file to determine the file's
status.
You can specify additional directories to search for version control
programs by setting the variable vc-path
. These directories are
searched before the usual search path. But the proper files are usually
found automatically.