CVS provides a set of commands to notify users when a file is being
edited or committed. You can use these commands to monitor what each
member of your team is doing and reduce the necessity of merging
cvs update is run. Together, the
cvs edit, and
commands make up the
method of exclusive
, which is a lightly enforced method
of exclusive development.
The watch method requires the repository administrator to set up the
users files in the
CVSROOT directory of the CVS repository; it
requires the developers to check whether a file is being edited
before they attempt to edit it.
cvs watch like this:
Check out your sandbox, including the files you want to watch.
cvs watch on command to mark files for
watching. (This does not set you as the watcher for the files; it
just informs CVS that the files can be watched.) Once a file has been
marked for watching, it remains marked unless it is cleared with
cvs watch off.
You need to use
cvs watch on for a file only
once, unless someone clears the setting. Usually, your project leader
decides which files can be watched and will mark those files for
cvs watch add command
cvs edit to inform CVS and other users
that you intend to edit a specific file. Other users watching the
file will be notified that you are editing it.
Edit the file in any editor.
Commit your changes ...