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

N.7.10.3 Options specific for CVS

By default, CVS does not use locking to coordinate the activities of several users; anyone can change a work file at any time. However, there are ways to restrict this, resulting in behavior that resembles locking.

For one thing, you can set the CVSREAD environment variable (the value you use makes no difference). If this variable is defined, CVS makes your work files read-only by default. In Emacs, you must type C-x C-q to make the file writable, so that editing works in fact similar as if locking was used. Note however, that no actual locking is performed, so several users can make their files writable at the same time. When setting CVSREAD for the first time, make sure to check out all your modules anew, so that the file protections are set correctly.

Another way to achieve something similar to locking is to use the watch feature of CVS. If a file is being watched, CVS makes it read-only by default, and you must also use C-x C-q in Emacs to make it writable. VC calls cvs edit to make the file writable, and CVS takes care to notify other developers of the fact that you intend to change the file. See the CVS documentation for details on using the watch feature.

When a file's repository is on a remote machine, VC tries to keep network interactions to a minimum. This is controlled by the variable vc-cvs-stay-local. If it is t (the default), then VC uses only the entry in the local CVS subdirectory to determine the file's state (and possibly information returned by previous CVS commands). One consequence of this is that when you have modified a file, and somebody else has already checked in other changes to the file, you are not notified of it until you actually try to commit. (But you can try to pick up any recent changes from the repository first, using C-x v m RET, see section Merging Branches).

When vc-cvs-stay-local is t, VC also makes local version backups, so that simple diff and revert operations are completely local (see section Version Backups).

On the other hand, if you set vc-cvs-stay-local to nil, then VC queries the remote repository before it decides what to do in vc-next-action (C-x v v), just as it does for local repositories. It also does not make any version backups.

You can also set vc-cvs-stay-local to a regular expression that is matched against the repository host name; VC then stays local only for repositories from hosts that match the pattern.


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

This document was generated by Roberto on abril, 2 2007 using texi2html 1.76.