Go to the first, previous, next, last section, table of contents.


Options for VC Backends

You can tell RCS and CVS whether to use locking for a file or not (see section Concepts of Version Control, for a description of locking). VC automatically recognizes what you have chosen, and behaves accordingly.

For RCS, the default is to use locking, but there is a mode called non-strict locking in which you can check-in changes without locking the file first. Use `rcs -U' to switch to non-strict locking for a particular file, see the `rcs' manpage for details.

Under CVS, the default is not to use locking; 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 to an arbitrary value. 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 writeable, 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 writeable 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 writeable, 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.

You can turn off use of VC for CVS-managed files by setting the variable vc-handle-cvs to nil. If you do this, Emacs treats these files as if they were not registered, and the VC commands are not available for them. You must do all CVS operations manually.


Go to the first, previous, next, last section, table of contents.