1<div id="Setting-a-watch"></div>
2<div class="header">
3<p>
4Next: [[cvs: Telling CVS to notify you#Telling CVS to notify you|Getting Notified]], Up: [[cvs: Mechanisms to track who is editing files#Mechanisms to track who is editing files|Watches]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
5</div>
6
7----
8
9<div id="Telling-CVS-to-watch-certain-files"></div>
10==== Telling CVS to watch certain files ====
11
12To enable the watch features, you first specify that
13certain files are to be watched.
14
15<div id="index-watch-on-_0028subcommand_0029"></div>
16;<div id="index-cvs-watch-on"></div>Command<nowiki>:</nowiki> <strong>cvs watch on</strong><em> <nowiki>[</nowiki><code>-lR</code><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var><nowiki>]</nowiki>&hellip;</em>
17
18<div id="index-Read_002donly-files_002c-and-watches"></div>
19: Specify that developers should run <code>cvs edit</code> before editing <var>files</var>.  <small>CVS</small> will create working copies of <var>files</var> read-only, to remind developers to run the <code>cvs edit</code> command before working on them.
20
21: If <var>files</var> includes the name of a directory, <small>CVS</small> arranges to watch all files added to the corresponding repository directory, and sets a default for files added in the future; this allows the user to set notification policies on a per-directory basis.  The contents of the directory are processed recursively, unless the <code>-l</code> option is given. The <code>-R</code> option can be used to force recursion if the <code>-l</code> option is set in &lsquo;<tt>~/.cvsrc</tt>&rsquo; (see [[cvs: Default options and the ~%47.cvsrc file#Default options and the ~/.cvsrc file|~/.cvsrc]]).
22
23: If <var>files</var> is omitted, it defaults to the current directory.
24
25<div id="index-watch-off-_0028subcommand_0029"></div>
26
27;<div id="index-cvs-watch-off"></div>Command<nowiki>:</nowiki> <strong>cvs watch off</strong><em> <nowiki>[</nowiki><code>-lR</code><nowiki>]</nowiki> <nowiki>[</nowiki><var>files</var><nowiki>]</nowiki>&hellip;</em>
28
29: Do not create <var>files</var> read-only on checkout; thus, developers will not be reminded to use <code>cvs edit</code> and <code>cvs unedit</code>.
30
31: The <var>files</var> and options are processed as for <code>cvs watch on</code>.
32
33
34This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
35