CVS commands
The CVS commands cvs watch and cvs notify are used, usually in combination, by project participants to set up the notification mechanism:
- cvs watch on|off
Assuming we have a CVS-controlled project called proj1 and we’re currently inside a local checked-out copy of the project’s files, we first use cvs watch to tell CVS to watch a file (“turn a watch on“) that we’re interested in, which is file4 in this example:
yak:~/projects/proj1$
cvs watch on file4This causes CVS to mark file4 as “watched,” which means any time a project participant checks out the file from the central repository, the checked-out working copy is created with read-only attributes. This means the participant is (initially) prevented from saving any changes to that working copy. It is, in effect, a reminder to that participant to use the CVS command cvs edit, specifying file4, before commencing the edit session. Using cvs edit causes CVS to:
Remove the read-only attribute for the file
Send out notifications (to those who have requested them with the cvs watch add) that the participant has commenced editing it
- cvs watch add|remove
While running cvs watch on against a file will set a marker causing the file to be replicated with the read-only attribute when checked out (which has the effect of “suggesting” to the participant editing the file that he use the cvs edit command to signal that he’s to start editing), the actual determination of the notification recipients is set up using the
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access