Editing files -- CVS---Concurrent Versions System



Next: Watch information Prev: Getting Notified Up: Watches Top: Top

6.6.3. How to edit a file which is being watched

Since a file which is being watched is checked out read-only, you cannot simply edit it. To make it read-write, and inform others that you are planning to edit it, use the cvs edit command.

cvs edit [options] files ... -- Command
Prepare to edit the working files files. CVS makes the files read-write, and notifies users who have requested edit notification for any of files.

The cvs edit command accepts the same options as the cvs watch add command, and establishes a temporary watch for the user on files; CVS will remove the watch when files are unedited or committed. If the user does not wish to receive notifications, she should specify -a none.

The files and -l option are processed as for the cvs watch commands.

Normally when you are done with a set of changes, you use the cvs commit command, which checks in your changes and returns the watched files to their usual read-only state. But if you instead decide to abandon your changes, or not to make any changes, you can use the cvs unedit command.

cvs unedit [-l] files ... -- Command
Abandon work on the working files files, and revert them to the repository versions on which they are based. CVS makes those files read-only for which users have requested notification using cvs watch on. CVS notifies users who have requested unedit notification for any of files.

The files and -l option are processed as for the cvs watch commands.

When using client/server cvs, you can use the cvs edit and cvs unedit commands even if cvs is unable to succesfully communicate with the server; the notifications will be sent upon the next successful cvs command.



Next: Watch information Prev: Getting Notified Up: Watches Top: Top