Annotation of src/usr.bin/cvs/cvs.1, Revision 1.88
1.88 ! xsa 1: .\" $OpenBSD: cvs.1,v 1.87 2005/08/23 08:17:44 jmc Exp $
1.1 jfb 2: .\"
3: .\" Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
1.36 xsa 4: .\" Copyright (c) 2004, 2005 Xavier Santolaria <xsa@openbsd.org>
1.1 jfb 5: .\" All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\"
11: .\" 1. Redistributions of source code must retain the above copyright
12: .\" notice, this list of conditions and the following disclaimer.
13: .\" 2. The name of the author may not be used to endorse or promote products
14: .\" derived from this software without specific prior written permission.
15: .\"
16: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
17: .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
18: .\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
19: .\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20: .\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21: .\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22: .\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23: .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24: .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25: .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26: .\"
27: .Dd May 16, 2004
28: .Dt CVS 1
29: .Os
30: .Sh NAME
31: .Nm cvs
1.68 joris 32: .Nd OpenCVS Concurrent Versioning System
1.1 jfb 33: .Sh SYNOPSIS
34: .Nm
1.84 jmc 35: .Bk -words
1.83 xsa 36: .Op Fl flnQqrtvw
1.1 jfb 37: .Op Fl d Ar root
38: .Op Fl e Ar editor
1.20 jmc 39: .Xo
40: .Oo Fl s
41: .Ar var Ns = Ns Ar val Oc
42: .Xc
1.77 xsa 43: .Op Fl T Ar tmpdir
1.15 jmc 44: .Op Fl z Ar level
1.1 jfb 45: .Ar command Op Ar ...
1.84 jmc 46: .Ek
1.1 jfb 47: .Sh DESCRIPTION
48: The
49: .Nm
50: program acts as both client and server for the use of and administration of
51: a CVS source repository.
52: CVS is used to maintain version information on files that are kept in a
53: repository.
54: Although it is more commonly used to track changes in source code, there
55: are no real limitations to the type of files that you can store in a
56: repository.
1.35 jmc 57: For a general introduction to CVS, see
58: .Xr cvsintro 7 .
1.1 jfb 59: .Pp
1.7 jfb 60: .Nm
1.35 jmc 61: reads its startup configuration file,
62: .Pa .cvsrc ,
1.7 jfb 63: from the home directory of the user who invoked it.
64: This file is used to specify implicit options passed to
65: .Nm
66: or one of its commands whenever it is invoked.
1.35 jmc 67: The defaults in the configuration file can be overridden with the
68: .Fl f
69: option (see below).
1.16 jmc 70: See
71: .Xr cvsrc 5
72: for further information.
1.7 jfb 73: .Pp
1.1 jfb 74: The following options are supported:
1.61 deraadt 75: .Bl -tag -width Ds
1.1 jfb 76: .It Fl d Ar root
77: Use
78: .Ar root
79: as the path to the root directory of the CVS repository.
80: The value must specify an absolute path.
81: .It Fl e Ar editor
82: Use the program
83: .Ar editor
84: whenever editing log information.
1.8 jmc 85: This option overrides the environment variables CVSEDITOR, VISUAL, and EDITOR.
1.1 jfb 86: .It Fl f
1.7 jfb 87: Do not read the user's configuration file on startup.
1.1 jfb 88: .It Fl l
89: Suppress logging of history information.
1.67 xsa 90: .It Fl n
91: Dry-run mode.
92: Show which files will be used by the command issued
93: without really running it.
1.1 jfb 94: .It Fl Q
95: Be extra quiet.
96: Only error messages will be displayed.
97: .It Fl q
98: Be quiet about reporting.
1.70 xsa 99: .It Fl r
100: Extract files in read-only mode.
1.20 jmc 101: .It Fl s Ar var Ns = Ns Ar val
102: Set the value of the internal variable
103: .Ar var
104: to the string
105: .Ar val .
1.77 xsa 106: .It Fl T Ar tmpdir
107: Set the value of the directory where temporary files are to be created.
108: The default is set to
109: .Pa /tmp .
1.15 jmc 110: .It Fl t
111: Trace program execution.
1.1 jfb 112: .It Fl v
113: Display version information and exit.
1.83 xsa 114: .It Fl w
115: Extract new files in read-write mode.
116: Overrides the setting of the
117: .Ev CVSREAD
118: environment variable.
119: This is the default unless
120: .Ev CVSREAD
121: is set or the
122: .Fl r
123: option is specified.
1.15 jmc 124: .It Fl z Ar level
125: Specify the compression level to
126: .Xr gzip 1
127: when transferring files.
128: The compression level ranges from 1 to 9,
129: with 1 being the fastest,
130: and 9 providing the best level of compression.
131: The default is 6.
1.45 xsa 132: .El
133: .Sh KEYWORD SUBSTITUTION
134: As long as you edit source files inside a working directory you
135: can always find out the state of your files via the
136: .Ic status
137: or
138: .Ic log
139: commands, but as soon as files get exported from
140: your local working copy, it becomes harder to identify which
141: revisions they are.
142: .Pp
143: .Nm
144: can use a mechanism known as
145: .Sq keyword substitution
146: to help identify the files.
147: Embedded strings of the form $keyword$ and $keyword:...$ in a file
148: are replaced with strings of the form $keyword: value$ whenever you
149: obtain a new revision of the file.
150: The possible keywords are as follows:
1.61 deraadt 151: .Bl -tag -width Ds
1.48 xsa 152: .It $\&Author$
1.45 xsa 153: The name of the user who checked in the revision.
1.48 xsa 154: .It $\&Date$
1.45 xsa 155: The date and hour (UTC) the revision was checked in.
1.48 xsa 156: .It $\&Header$
1.45 xsa 157: Standard header containing the full pathname of the RCS
158: file, the revision number, the date (UTC), the author and the state.
1.48 xsa 159: .It $\&Id$
160: The same content as $\&Header$ but without the path
1.45 xsa 161: of the RCS file.
1.48 xsa 162: .It $\&Log$
1.45 xsa 163: The log message supplied during commit, preceded by a header
164: containing the RCS filename, the revision number, the
165: author, and the date (UTC).
1.48 xsa 166: .It $\&Name$
1.45 xsa 167: The tag name used to check out the file.
1.48 xsa 168: .It $\&RCSfile$
1.45 xsa 169: The name of the RCS file, but without a path.
1.48 xsa 170: .It $\&Revision$
1.45 xsa 171: The revision number assigned to the revision.
1.48 xsa 172: .It $\&Source$
1.45 xsa 173: The full pathname of the RCS file.
1.48 xsa 174: .It $\&State$
1.45 xsa 175: The state assigned to the revision.
176: .El
177: .Pp
178: Keyword substitution has its disadvantages: sometimes the
1.48 xsa 179: literal text string $\&Author$ is wanted inside a file without
1.45 xsa 180: .Nm
181: interpreting it as a keyword and expanding it into something like
1.48 xsa 182: $\&Author$.
1.45 xsa 183: The
184: .Fl k Ar o
1.48 xsa 185: option can be used to turn off keyword substitution entirely though.
1.45 xsa 186: There is unfortunately no way to selectively turn off keyword substitution.
187: .Pp
188: Each file and working directory copy of a file have a stored
189: default substitution mode.
190: Substitution modes on files are set by the
191: .Fl k Ar mode
192: option to the
193: .Ic add
194: and
195: .Ic admin
196: commands or by the
197: .Fl k Ar mode
198: or
199: .Fl A
200: options to the
201: .Ic checkout
202: or
203: .Ic update
204: commands.
205: .Pp
206: The possible substitution modes are as follows:
207: .Bl -tag -width Ds -offset 3n
208: .It Fl k Ar b
209: Like
210: .Fl k Ar o ,
211: but also avoids the conversion of line endings.
212: This option is used to handle binary files.
213: .It Fl k Ar k
214: Does not substitute the keywords.
215: Useful with the
216: .Ic diff
217: command to avoid displaying the differences between keyword substitutions.
218: .It Fl k Ar kv
219: The default behaviour.
1.48 xsa 220: Keywords are normally substituted i.e. $\&Revision$ becomes
221: $\&Revision: 1.1 $.
1.45 xsa 222: .It Fl k Ar kvl
223: Like
224: .Fl k Ar kv ,
225: except that the locker's name is displayed along with the version
226: if the given revision is currently locked.
227: This option is normally not useful as
228: .Nm
229: does not use file locking by default.
230: .It Fl k Ar o
231: No substitutions are done.
232: This option is often used with the
233: .Ic import
234: command to guarantee that files that already contain external keywords
235: do not get modified.
236: .It Fl k Ar v
1.54 david 237: Substitute the value of keywords instead of keywords themselves
1.48 xsa 238: e.g. instead of $\&Revision$, only insert 1.1 and not $\&Revision: 1.1 $.
1.45 xsa 239: This option must be used with care, as it can only be used once.
240: It is often used with the
241: .Ic export
242: command to freeze the values before releasing software.
1.1 jfb 243: .El
244: .Sh COMMANDS
1.3 jfb 245: The following commands are supported by
1.44 jmc 246: .Nm :
1.61 deraadt 247: .Bl -tag -width Ds
1.42 xsa 248: .It Xo Ic add
249: .Op Fl k Ar mode
250: .Op Fl m Ar msg
251: .Ar file ...
1.3 jfb 252: .Xc
1.42 xsa 253: Before a file is known to
254: .Nm ,
255: it must be added to the repository using this command.
1.1 jfb 256: Adding a file does not actually publish the contents of the
1.42 xsa 257: file: the
1.11 jmc 258: .Ic commit
1.42 xsa 259: command must also be used to publish it into the repository,
260: and thus let others access the file.
261: .Pp
262: Note: since directories have no versioning system, it is sufficient
263: to add them with the
264: .Ic add
265: command alone; the
266: .Ic commit
267: command is not necessary.
1.1 jfb 268: .Pp
1.35 jmc 269: The
270: .Ic add
271: command takes the following options:
272: .Bl -tag -width Ds -offset 3n
1.42 xsa 273: .It Fl k Ar mode
274: Specify the keyword substitution mode.
1.35 jmc 275: .It Fl m Ar msg
276: Attach log message
277: .Ar msg .
278: By default, no log message is required.
279: .El
1.13 jmc 280: .Pp
281: Aliases:
282: .Ic ad ,
283: .Ic new .
1.59 xsa 284: .It Xo Ic admin
285: .Op Fl Iq
286: .Op Fl b Ar branch
287: .Op Fl k Ar mode
1.60 jmc 288: .Op Fl m Ar rev : Ns Ar msg
1.59 xsa 289: .Oo Fl N Ar tag Ns
290: .Op : Ns Ar rev Oc
291: .Oo Fl n Ar tag Ns
292: .Op : Ns Ar rev Oc
293: .Op Fl o Ar rev
294: .Oo Fl s Ar state Ns
295: .Op : Ns Ar rev Oc
296: .Oo Fl t Ar file \*(Ba
297: .Ar str Oc
298: .Xc
299: The
300: .Ic admin
301: command is used to directly modify the RCS files.
302: .Pp
303: The
304: .Ic admin
305: command takes the following options:
306: .Bl -tag -width Ds -offset 3n
307: .It Fl b Ar branch
308: Set the default branch to
309: .Ar branch .
310: .It Fl I
311: Command is interactive.
1.69 moritz 312: .It Fl k Ar mode
1.59 xsa 313: Specify the keyword substitution mode.
314: .It Fl m Ar rev : Ns Ar msg
315: Change the log message of a revision.
316: .It Xo Fl N
317: .Ar tag Ns Op : Ns Ar rev
318: .Xc
319: Same as
320: .Fl n ,
321: but override tag if it already exists.
322: .It Xo Fl n
323: .Ar tag Ns Op : Ns Ar rev
324: .Xc
325: Associate the
326: .Ar tag
327: with the
328: .Ar rev
329: or the branch given as argument.
330: If the revision or the branch is not specified, the tag is deleted.
331: The
332: .Sq \&:
333: character means the association of the tag and the latest revision of
334: the default branch.
335: A branch number ending with the
336: .Sq \&.
337: character means the current latest revision in the branch.
338: This option is functionally the same as the
339: .Ic rtag
340: command, but it avoids the check of the tags done with the
341: .Pa CVSROOT/taginfo
342: file.
343: .It Fl o Ar rev
344: Delete one or more revisions.
345: The specifications of the values or revisions are as follows:
1.61 deraadt 346: .Bl -tag -width Ds
1.59 xsa 347: .It rev
348: Specific revision.
349: .It rev1:rev2
350: Delete all revisions of a branch between
351: .Ar rev1
352: and
353: .Ar rev2 .
354: .It rev1::rev2
355: Delete all revisions of a branch between
356: .Ar rev1
357: and
358: .Ar rev2
359: without deleting revisions
360: .Ar rev1
361: and
362: .Ar rev2 .
363: .It :rev
364: Delete all revisions of the branch until revision
365: .Ar rev .
366: .It rev:
367: Delete all revisions of the branch from revision
368: .Ar rev
369: until the last revision of the branch.
370: .El
371: .It Fl q
372: Quiet mode.
373: .It Xo Fl s
374: .Ar state Ns Op : Ns Ar rev
375: .Xc
376: Change state of a revision.
377: If the revision is not specified, the last revision of the default
378: branch changes state.
379: The
380: .Ic state
381: is a string of characters of your choice.
382: The state of a revision can be modified without having to
383: .Ic commit
384: a new revision.
385: The default
386: .Ic state
387: is
388: .Sq Exp
389: (Experimental).
390: For instance, you could also use
391: .Sq Dev
392: or
393: .Sq Reviewed .
394: .It Fl t Ar file \*(Ba Ar str
395: Change the descriptive text.
396: The descriptive text is taken from the
397: .Ar file
398: specified as argument or from the string
399: .Ar str
400: given as argument if it is preceded by the
401: .Sq -
402: character.
403: If no argument is used, the descriptive text is taken from standard input.
404: .El
1.13 jmc 405: .Pp
406: Aliases:
407: .Ic adm ,
408: .Ic rcs .
1.26 xsa 409: .It Xo Ic annotate
410: .Op Fl flR
411: .Oo Fl D Ar date \*(Ba
412: .Fl r Ar rev Oc
413: .Op Ar file ...
414: .Xc
1.23 xsa 415: For each line of any files specified, show information about its
416: last revision.
417: The information given is the last revision when a modification occurred,
418: the author's name, and the date of the revision.
1.26 xsa 419: .Pp
420: The
1.35 jmc 421: .Ic annotate
422: command takes the following options:
423: .Bl -tag -width Ds -offset 3n
424: .It Fl D Ar date
425: Show the annotations as of the latest revision no later than
426: .Ar date .
427: .It Fl f
428: Force the use of the head revision if the specified
1.26 xsa 429: tag or date is not found.
430: This can be used in combination with
431: .Fl D
432: or
433: .Fl r
434: to ensure that there is some output from the
435: .Ic annotate
436: command, even if only to show Revision 1.1 of the file.
1.35 jmc 437: .It Fl l
438: Limit the scope of the search to the local directory
439: only and disable recursive behaviour.
440: .It Fl R
441: Enable recursive behaviour.
442: This is the default.
443: .It Fl r Ar rev
444: Show annotations as of revision
1.26 xsa 445: .Ar rev
446: (can be a revision number or a tag).
1.35 jmc 447: .El
1.13 jmc 448: .Pp
449: Aliases:
1.66 jfb 450: .Ic ann ,
451: .Ic blame .
1.11 jmc 452: .It Xo Ic checkout
1.37 xsa 453: .Op Fl AcflNnPpRs
454: .Op Fl d Ar dir
455: .Op Fl j Ar rev
456: .Op Fl k Ar mode
457: .Fl D Ar date \*(Ba
458: .Fl r Ar rev
459: .Ar module ...
1.7 jfb 460: .Xc
461: .Pp
462: The
1.11 jmc 463: .Ic checkout
1.7 jfb 464: command is used to create a local copy of one or more modules present on the
465: target CVS repository.
1.37 xsa 466: .Pp
467: The
468: .Ic checkout
469: command takes the following options:
470: .Bl -tag -width Ds -offset 3n
471: .It Fl A
1.41 xsa 472: Reset any sticky tags, dates, or keyword substitution modes that
473: have been set on the tree.
1.37 xsa 474: .It Fl c
475: Display the list of available modules.
476: .It Fl D Ar date
477: Check out as of the latest revision no later than
478: .Ar date
479: (is sticky).
480: .It Fl d Ar dir
481: Check out in directory
482: .Ar dir
483: instead of the directory bearing the same name as the
484: .Ar module .
485: .It Fl f
486: Force the use of the head revision if the specified
487: tag or date is not found.
488: .It Fl j Ar rev
489: Merge in changes made between current revision and
490: .Ar rev .
491: If two
492: .Fl j
493: options are specified, only merge the differences between the two
494: revisions of the branch.
495: This allows successive merges without having to resolve
496: already resolved conflicts again.
497: .It Fl k Ar mode
498: Specify the keyword substitution mode (is sticky).
499: .It Fl l
500: Limit the scope of the search to the local directory
501: only and disable recursive behaviour.
502: .It Fl N
503: If used in conjunction with the
504: .Fl d
505: option, files are placed in local directory
506: .Ar module ,
507: located in directory
508: .Ar dir .
509: .It Fl n
510: Do not execute programs listed in the
511: .Pa CVSROOT/modules
512: file.
513: .It Fl P
514: Prune empty directories.
515: .It Fl p
516: Check out files to standard output (avoids stickiness).
517: .It Fl R
518: Enable recursive behaviour.
519: This is the default.
520: .It Fl r Ar rev
521: Check out from a particular revision or branch (implies
522: .Fl P )
523: (is sticky).
524: .It Fl s
525: Like
526: .Fl c ,
527: but include module status.
528: .El
1.13 jmc 529: .Pp
530: Aliases:
531: .Ic co ,
532: .Ic get .
1.11 jmc 533: .It Xo Ic commit
1.3 jfb 534: .Op Fl flnR
1.27 xsa 535: .Oo Fl F Ar logfile \*(Ba
536: .Fl m Ar msg Oc
1.3 jfb 537: .Op Fl r Ar rev
1.4 jfb 538: .Op Ar file ...
1.3 jfb 539: .Xc
1.7 jfb 540: .Pp
1.1 jfb 541: The
1.11 jmc 542: .Ic commit
1.1 jfb 543: command is used to send local changes back to the server and update the
544: repository's information to reflect the changes.
1.27 xsa 545: .Pp
546: The
1.35 jmc 547: .Ic commit
548: command takes the following options:
549: .Bl -tag -width Ds -offset 3n
550: .It Fl F Ar logfile
551: Specify a
1.27 xsa 552: .Ar file
1.35 jmc 553: which contains the log message.
554: .It Fl f
555: Force a file to be committed, even though it is unchanged.
556: .It Fl l
557: Limit the scope of the search to the local directory
558: only and disable recursive behaviour.
559: .It Fl m Ar msg
560: Specify a log message on the command line (suppresses the editor invocation).
561: .It Fl n
562: Do not execute programs listed in the
563: .Pa CVSROOT/modules
564: file.
565: .It Fl R
566: Enable recursive behaviour.
567: This is the default.
568: .It Fl r Ar rev
569: Commit to a particular symbolic or numerical revision.
570: .El
1.13 jmc 571: .Pp
572: Aliases:
573: .Ic ci ,
574: .Ic com .
1.53 xsa 575: .It Xo Ic diff
1.63 jfb 576: .Op Fl cilNnpRu
1.53 xsa 577: .Oo Oo Fl D
578: .Ar date1 \*(Ba
579: .Fl r Ar rev1 Oc
580: .Oo Fl D Ar date2 \*(Ba
581: .Fl r Ar rev2 Oc Oc
582: .Op Fl k Ar mode
1.4 jfb 583: .Op Ar file ...
1.3 jfb 584: .Xc
1.7 jfb 585: .Pp
1.3 jfb 586: The
1.11 jmc 587: .Ic diff
1.3 jfb 588: command is very similar to the
589: .Xr diff 1
1.5 jfb 590: program, except that the differential comparisons that it generates are
1.3 jfb 591: between local or remote revisions of files stored in the CVS repository.
1.53 xsa 592: .Pp
593: The
594: .Ic diff
595: command takes the following options:
596: .Bl -tag -width Ds -offset 3n
597: .It Fl c
598: Produces a diff with three lines of context.
599: See
600: .Xr diff 1
601: for more information.
602: .It Xo Fl D Ar date1
603: .Op Fl D Ar date2
604: .Xc
605: Differences between the revision at
606: .Ar date1
607: and the working copy or
608: .Ar date1
609: and
610: .Ar date2
611: (if specified).
612: .It Fl i
613: Ignore the case of letters.
614: For example,
615: .Sq A
616: will compare equal to
617: .Sq a .
618: .It Fl k Ar mode
619: Specify the keyword substitution mode.
620: .It Fl l
621: Limit the scope of the search to the local directory
622: only and disable recursive behaviour.
623: .It Fl N
624: Include added or removed files.
1.63 jfb 625: .It Fl n
626: Produces a diff in the same format as that used by
627: .Xr rcsdiff 1 ,
628: with a count of changed lines on each insert or delete command.
1.53 xsa 629: .It Fl p
630: With unified and context diffs, show with each change the first
631: 40 characters of the last line before the context beginning with
632: a letter, an underscore or a dollar sign.
633: See
634: .Xr diff 1
635: for more information.
636: .It Fl R
637: Enable recursive behaviour.
638: This is the default.
639: .It Xo Fl r Ar rev1
640: .Op Fl r Ar rev2
641: .Xc
642: Differences between revision
643: .Ar rev1
644: and the working copy or
645: .Ar rev1
646: and
647: .Ar rev2
648: (if specified).
649: .It Fl u
650: Produces a unified diff with three lines of context.
651: See
652: .Xr diff 1
653: for more information.
654: .El
1.13 jmc 655: .Pp
656: Aliases:
657: .Ic di ,
658: .Ic dif .
1.30 xsa 659: .It Xo Ic edit Op Fl lR
660: .Op Fl a Ar action
661: .Op Ar file ...
662: .Xc
663: .Pp
664: The
665: .Ic edit
1.35 jmc 666: command is used to make a file that is being watched
667: (and therefore read-only)
1.30 xsa 668: readable and writable and to inform others that you are planning to edit it.
669: Notifications terminate when the
670: .Ic commit
671: command is issued.
672: Editing rights on the file can be given up using the
673: .Ic unedit
1.35 jmc 674: command, which terminates the temporary notifications.
1.30 xsa 675: .Pp
676: The
1.35 jmc 677: .Ic edit
678: command takes the following options:
679: .Bl -tag -width Ds -offset 3n
680: .It Fl a Ar action
681: Specify the temporary notification wanted:
682: .Pp
1.61 deraadt 683: .Bl -tag -width Ds -compact
1.30 xsa 684: .It Cm commit
1.35 jmc 685: Another user has committed changes to the file.
1.30 xsa 686: .It Cm edit
687: Another user has issued the
688: .Ic edit
1.35 jmc 689: command on the file.
1.30 xsa 690: .It Cm unedit
691: Another user has issued the
692: .Ic unedit
1.35 jmc 693: command on the file.
1.30 xsa 694: .It Cm all
695: All of the above.
696: .It Cm none
697: None of the above.
698: .El
699: .Pp
700: The
701: .Fl a
702: flag may appear more than once, or not at all.
703: If omitted, the action defaults to
1.31 jmc 704: .Cm all .
1.35 jmc 705: .It Fl l
706: Limit the scope of the search to the local directory
707: only and disable recursive behaviour.
708: .It Fl R
709: Enable recursive behaviour.
710: This is the default.
711: .El
1.33 xsa 712: .It Xo Ic editors
713: .Op Fl lR
1.34 xsa 714: .Op Ar file ...
1.33 xsa 715: .Xc
716: .Pp
717: The
718: .Ic editors
719: command lists the users with edition rights on a file.
720: For that, pseudo-lock mode must be enabled (see the
721: .Ic watch
722: command).
723: The e-mail address of the user editing the file, the timestamp
724: when the edition first started, the host from where the edition
725: has been requested and the path to the edited file are listed.
726: .Pp
727: The
1.35 jmc 728: .Ic editors
729: command takes the following options:
730: .Bl -tag -width Ds -offset 3n
731: .It Fl l
732: Limit the scope of the search to the local directory
733: only and disable recursive behaviour.
734: .It Fl R
735: Enable recursive behaviour.
736: This is the default.
737: .El
1.36 xsa 738: .It Xo Ic export
739: .Op Fl flNnR
740: .Op Fl d Ar dir
741: .Op Fl k Ar mode
742: .Fl D Ar date \*(Ba
743: .Fl r Ar rev
744: .Ar module ...
745: .Xc
746: .Pp
747: The
748: .Ic export
749: command extracts a copy of
750: .Ar module
751: without including the directories used for management by
752: .Nm .
753: This eases production of a software release.
754: A date or a revision must be specified for the command to be valid,
755: which ensures that later extractions can be reproduced with the same
756: options as the release.
757: .Pp
758: The checked out module's files will be placed in a directory
759: bearing the same name as the checked out module, by default.
760: .Pp
761: The
762: .Ic export
763: command takes the following options:
764: .Bl -tag -width Ds -offset 3n
765: .It Fl D Ar date
766: Export as of the latest revision no later than
767: .Ar date .
768: .It Fl d Ar dir
769: Export in directory
770: .Ar dir
771: instead of the directory bearing the same name as the
772: .Ar module .
773: .It Fl f
774: Force the use of the head revision if the specified
775: tag or date is not found.
776: This can be used in combination with
777: .Fl D
778: or
779: .Fl r
780: to ensure that the
781: .Ic export
782: command is valid.
783: .It Fl k Ar mode
784: Specify the keyword substitution mode: the
785: .Fl k Ar v
786: option is often used to avoid substitution of keywords during
787: a release cycle.
788: However, be aware that it does not handle an export containing
789: binary files correctly.
790: .It Fl l
791: Limit the scope of the search to the local directory
792: only and disable recursive behaviour.
793: .It Fl N
794: If used in conjunction with the
795: .Fl d
796: option, files are placed in local directory
797: .Ar module ,
798: located in directory
799: .Ar dir .
800: .It Fl n
801: Do not execute programs listed in the
802: .Pa CVSROOT/modules
803: file.
804: .It Fl R
805: Enable recursive behaviour.
806: This is the default.
807: .It Fl r Ar rev
808: Export from a particular symbolic or numerical revision.
809: .El
1.13 jmc 810: .Pp
811: Aliases:
812: .Ic ex ,
813: .Ic exp .
1.49 xsa 814: .It Xo Ic history
815: .Op Fl aceloTw
816: .Op Fl b Ar str
817: .Op Fl D Ar date
818: .Op Fl f Ar file
819: .Op Fl m Ar module
820: .Op Fl n Ar module
821: .Op Fl p Ar path
822: .Op Fl r Ar rev
823: .Op Fl t Ar tag
824: .Op Fl u Ar user
825: .Op Fl x Ar ACEFGMORTUW
826: .Op Fl z Ar tz
827: .Op Ar file ...
828: .Xc
829: .Pp
830: The
831: .Ic history
832: command is used to display the history of actions done in the
833: base repository.
834: This functionality is only available if the
1.50 xsa 835: .Pa CVSROOT/history
1.49 xsa 836: file has been created.
837: Only the
838: .Ic checkout ,
839: .Ic commit ,
840: .Ic export ,
841: .Ic release ,
842: .Ic rtag ,
843: and
844: .Ic update
845: commands are logged into this file.
846: .Pp
847: The
848: .Ic history
849: command takes the following options:
850: .Bl -tag -width Ds -offset 3n
851: .It Fl a
852: Display records for all users.
853: By default, only records from the user issuing the
854: .Ic history
855: command are displayed.
856: .It Fl b Ar str
857: Display everything back to a record containing the string
858: .Ar str
859: in either the module name, the file name, or the repository path.
860: .It Fl c
861: Display the archived files
862: .Pf ( Ic commit
863: command).
864: .It Fl D Ar date
865: Report no later than
866: .Ar date .
867: .It Fl e
868: Select all records (same as
869: .Fl x
870: with all types).
871: .It Fl f Ar file
872: Display records related to
873: .Ar file .
874: .It Fl l
875: Show last checkouts of modules with the
876: .Ic checkout
877: command.
878: .It Fl m Ar module
879: Look for the
880: .Ar module
881: (can be used several times).
882: .It Fl n Ar module
883: Search into the
884: .Ar module .
885: .It Fl o
886: Report on modules checked out by users.
887: .It Fl p Ar path
888: Display records from the base repository being in the directory
889: specified by the
890: .Ar path .
891: .It Fl r Ar rev
892: Report for a particular revision (checks in the RCS file).
893: .It Fl t Ar tag
894: Report since tag record placed in the
1.50 xsa 895: .Pa CVSROOT/history
1.49 xsa 896: file by any user.
897: .It Fl T
898: Report on all tags.
899: .It Fl u Ar user
900: Report for a specified
901: .Ar user .
902: Can be used several times to match many users.
903: .It Fl w
904: Check that records match the current working directory.
905: .It Fl x Ar ACEFGMORTUW
906: Extract by a specific record type specified by a single letter.
907: They can be used in combination.
908: The available types are as follows:
1.61 deraadt 909: .Bl -tag -width Ds
1.49 xsa 910: .It A
911: A file has been added with the
912: .Ic add
913: command.
914: .It C
915: A merge has been done, but unresolved conflicts still remain.
916: .It E
917: Export.
918: .It F
919: Release.
920: .It G
921: A merge has been done without conflict.
922: .It M
923: A file has been modified (using the
924: .Ic commit
925: command).
926: .It O
927: Checkout.
928: .It R
929: A file has been removed with the
930: .Ic remove
931: command.
932: .It T
933: Rtag.
934: .It U
935: Normal update.
936: .It W
937: The file has been deleted from the directory because it does not
938: exist anymore in the base repository.
939: .El
940: .It Fl z Ar tz
941: Display records with time synchronized with the
942: .Ar timezone
943: passed as argument.
944: .El
945: .Pp
946: All records have the following five first columns:
947: .Pp
948: .Bl -dash -compact
949: .It
950: The record type (the
951: .Fl x
952: option).
953: .It
954: The date of the action.
955: .It
956: The time of the action.
957: .It
958: The time zone.
959: .It
960: The user who made the action.
961: .El
962: .Pp
1.51 xsa 963: The other columns vary depending on the command issued:
964: .Pp
965: For records coming from the
966: .Ic rtag
967: command, the additional columns are as follows:
968: .Bd -literal -offset indent
969: <module> [<tag>:<argument>] {<working directory>}
970: .Ed
971: .Pp
972: For records coming from the
973: .Ic checkout
974: and
975: .Ic export
976: commands, the additional columns are as follows:
977: .Bd -literal -offset indent
978: <request> <repository> =<module>= <working directory>
979: .Ed
980: .Pp
981: For records coming from the
982: .Ic release
983: command, the additional columns are as follows:
984: .Bd -literal -offset indent
985: =<module>= <working directory>
986: .Ed
987: .Pp
988: For records coming from the
989: .Ic commit
990: and
991: .Ic update
992: commands, the additional columns are as follows:
993: .Bd -literal -offset indent
994: <version> <file> <module> == <working directory>
995: .Ed
1.13 jmc 996: .Pp
997: Aliases:
998: .Ic hi ,
999: .Ic his .
1.22 jmc 1000: .It Xo Ic import
1.78 xsa 1001: .Op Fl d
1.22 jmc 1002: .Op Fl b Ar branch
1.72 xsa 1003: .Op Fl I Ar ign
1004: .Op Fl k Ar mode
1.22 jmc 1005: .Op Fl m Ar msg
1.72 xsa 1006: .Op Fl W Ar spec
1007: .Ar module
1.22 jmc 1008: .Ar vendortag
1009: .Ar releasetag
1010: .Xc
1011: .Pp
1.13 jmc 1012: Import sources into CVS using vendor branches.
1.22 jmc 1013: .Pp
1014: At least three arguments are required:
1.72 xsa 1015: .Ar module
1.22 jmc 1016: specifies the location of the sources to be imported;
1017: .Ar vendortag
1018: is a tag for the entire branch;
1019: .Ar releasetag
1020: is used to identify the files you created with
1.35 jmc 1021: .Ic cvs import .
1022: .Pp
1023: The
1024: .Ic import
1025: command takes the following options:
1026: .Bl -tag -width Ds -offset 3n
1027: .It Fl b Ar branch
1028: Specify the first-level branch number.
1.78 xsa 1029: .It Fl d
1030: Use the file's last modification time as the timestamp for the
1031: initial revisions.
1.72 xsa 1032: .It Fl I Ar ign
1033: Ignore files specified by
1034: .Ar ign .
1035: This option can be used several times on the command line.
1036: To see all files, use the
1037: .Fl I Ar !\&
1038: specification.
1039: .It Fl k Ar mode
1040: Specify the keyword substitution mode (is sticky).
1.35 jmc 1041: .It Fl m Ar msg
1042: Specify the log message to send.
1.72 xsa 1043: .It Fl W Ar spec
1044: Wrappers specification line.
1.35 jmc 1045: .El
1.13 jmc 1046: .Pp
1047: Aliases:
1048: .Ic im ,
1049: .Ic imp .
1050: .It Ic init
1051: Create a CVS repository if it doesn't exist.
1052: .It Ic kserver
1053: Start a Kerberos authentication server.
1.52 xsa 1054: .It Xo Ic log
1055: .Op Fl bhlNRt
1056: .Op Fl d Ar dates
1057: .Op Fl r Ar revs
1058: .Op Fl s Ar state
1059: .Op Fl w Ar users
1060: .Op Ar file ...
1061: .Xc
1062: .Pp
1063: The
1064: .Ic log
1065: command displays information on a
1066: .Ar file
1067: such as its different revisions, description, different tags,
1068: as well as the comments, dates, and authors of these revisions.
1069: By default, the
1070: .Ic log
1071: command displays all the available information; the options are only
1072: used to restrict the displayed information.
1073: .Pp
1074: The
1075: .Ic log
1076: command takes the following options:
1077: .Bl -tag -width Ds -offset 3n
1078: .It Fl b
1079: List revisions of the default branch only.
1080: .It Fl d Ar dates
1081: Specify revisions with dates matching the specification.
1082: The specification might be as follows:
1.61 deraadt 1083: .Bl -tag -width Ds
1.52 xsa 1084: .It D1>D2 or D2>D1
1085: Select all revisions between
1086: .Ar \&D1
1087: and
1088: .Ar D2 .
1089: .It <D or D>
1090: Select all revisions before
1091: .Ar D .
1092: .It >D or D<
1093: Select all revisions after
1094: .Ar D .
1095: .It D
1096: Select the latest revision before or equal to
1097: .Ar D .
1098: .El
1099: .Pp
1100: The
1101: .Sq \*(Gt
1102: and
1103: .Sq \*(Lt
1104: characters can be followed by the
1105: .Sq =
1106: character to imply an inclusive specification.
1107: Several specifications can be used by separating them with the
1108: .Sq \&;
1109: character.
1110: .It Fl h
1111: Print header only.
1112: .It Fl l
1113: Limit the scope of the search to the local directory only.
1114: .It Fl N
1115: Do not list tags.
1116: .It Fl R
1117: Print name of RCS file only.
1118: .It Fl r Ar revs
1119: Specify revision(s) to list:
1.61 deraadt 1120: .Bl -tag -width Ds
1.52 xsa 1121: .It REV1,REV2,...,
1122: A list of revisions is specified by separating names or numbers
1123: of revisions by the
1124: .Sq \&,
1125: character.
1126: .It REV1:REV2
1127: List all revisions between
1128: .Ar REV1
1129: and
1130: .Ar REV2
1131: (they must be on the same branch).
1132: .It :REV
1133: List all revisions since the beginning of the branch until
1134: .Ar REV
1135: included.
1136: .It REV:
1137: List all revisions of the branch beginning with
1138: .Ar REV .
1139: .It BRANCH
1140: List all revisions of a branch.
1141: .It BRANCH.
1142: List the latest revision of the branch
1143: .Ar BRANCH .
1144: .It BRANCH1:BRANCH2
1145: List all revisions of branches between
1146: .Ar BRANCH1
1147: and
1148: .Ar BRANCH2 .
1149: .El
1150: .Pp
1151: Without argument, the
1152: .Fl r
1153: option means the latest revision of the default branch.
1154: .It Fl s Ar state
1155: List revisions of the specified
1156: .Ar state
1157: only.
1158: Several states can be listed by separating them with the
1159: .Sq \&,
1160: character.
1161: .It Fl t
1162: Print header and description only.
1163: .It Fl w Ar users
1164: Do not list revisions made by specified
1165: .Ar users .
1166: Usernames should be separated by the
1167: .Sq \&,
1168: character.
1169: .El
1.13 jmc 1170: .Pp
1171: Aliases:
1172: .Ic lo .
1173: .It Ic login
1.35 jmc 1174: Prompt for a password for an authenticating server.
1.13 jmc 1175: .It Ic logout
1.35 jmc 1176: Remove an entry in
1177: .Pa .cvspass
1178: for a remote repository.
1.55 xsa 1179: .It Xo Ic rdiff
1180: .Op Fl flR
1181: .Oo Fl c \*(Ba
1182: .Fl u Oc
1183: .Oo Fl s \*(Ba
1184: .Fl t Oc
1185: .Op Fl V Ar ver
1186: .Fl D Ar date \*(Ba
1187: .Fl r Ar rev
1188: .Oo Fl D Ar date2 \*(Ba
1189: .Fl r Ar rev2 Oc
1190: .Ar module ...
1191: .Xc
1192: .Pp
1193: The
1194: .Ic rdiff
1195: command lists differences between two revisions in a
1.13 jmc 1196: .Xr patch 1
1.55 xsa 1197: compatible format.
1198: This command does not need a local checkout of the repository
1199: to work.
1200: .Pp
1201: The
1202: .Ic rdiff
1203: command takes the following options:
1204: .Bl -tag -width Ds -offset 3n
1205: .It Fl c
1206: Produces a diff with three lines of context.
1207: See
1208: .Xr diff 1
1209: for more information.
1210: This is the default.
1211: .It Xo Fl D Ar date
1212: .Op Fl D Ar date2
1213: .Xc
1214: Differences between the revision at
1215: .Ar date
1216: and the working copy or
1217: .Ar date
1218: and
1219: .Ar date2
1220: (if specified).
1221: .It Fl f
1222: Force the use of the head revision if the specified
1223: date or revision is not found.
1224: .It Fl l
1225: Limit the scope of the search to the local directory
1226: only and disable recursive behaviour.
1227: .It Fl R
1228: Enable recursive behaviour.
1229: This is the default.
1230: .It Xo Fl r Ar rev
1231: .Op Fl r Ar rev2
1232: .Xc
1233: Differences between revision
1234: .Ar rev
1235: and the working copy or
1236: .Ar rev
1237: and
1238: .Ar rev2
1239: (if specified).
1240: .It Fl s
1241: Create a summary change instead of a whole patch.
1242: .It Fl t
1243: Lists differences between the last two revisions of each file.
1244: .It Fl u
1245: Produces a diff in unidiff format.
1246: .It Fl V Ar ver
1247: Use the RCS version
1248: .Ar ver
1249: for keyword substitution.
1250: .El
1251: .Pp
1252: Aliases:
1253: .Ic pa ,
1254: .Ic patch .
1.39 xsa 1255: .It Xo Ic release
1256: .Op Fl d
1257: .Ar dir ...
1258: .Xc
1259: The
1260: .Ic release
1261: command indicates to
1262: .Nm
1263: that the working copy of a module is no longer in use and checks
1264: that non archived modifications in the base repository do exist.
1265: This command is not mandatory.
1266: Local directories could always be removed without using it, but
1267: in this case the handling of history information will no longer be
1268: correct (see the
1269: .Ic history
1270: command).
1271: .Pp
1272: The
1273: .Ic release
1274: command takes the following options:
1275: .Bl -tag -width Ds -offset 3n
1276: .It Fl d Ar dir
1277: Remove the directory
1278: .Ar dir .
1279: Be aware that this option silently removes any directories that have
1280: been added to the local working copy without using the
1281: .Ic add
1282: command.
1283: .El
1284: .Pp
1285: For each file not being synchronized with the base repository,
1286: a single letter prefix is given to specify the state of the file.
1287: The possible prefixes are as follows:
1.61 deraadt 1288: .Bl -tag -width Ds
1.39 xsa 1289: .It \&?
1290: The file is unknown to
1291: .Nm
1292: and is not in the list of files to ignore.
1293: Any new directories which have not been added with the
1294: .Ic add
1295: command are silently ignored as well as their content.
1296: .It A
1297: The file has been added with the
1298: .Ic add
1299: command, but has not been committed to the repository with the
1300: .Ic commit
1301: command.
1302: .It M
1303: The file has been locally modified; a more recent version might
1304: exist in the base repository.
1305: .It R
1306: The file has been removed with the
1307: .Ic remove
1308: command, but has not been committed to the repository with the
1309: .Ic commit
1310: command.
1311: .It U
1312: A more recent version of the file does exist but it is not
1313: locally up to date.
1314: .El
1.40 xsa 1315: .Pp
1316: Aliases:
1317: .Ic re ,
1318: .Ic rel .
1.18 xsa 1319: .It Xo Ic remove
1320: .Op Fl flR
1321: .Op Ar file ...
1322: .Xc
1323: The
1324: .Ic remove
1325: command is used to inform
1326: .Nm
1327: that
1328: .Ar file
1329: is scheduled to be removed from the repository.
1330: Files are not actually removed from the repository until the
1331: .Ic commit
1332: command has been run subsequently.
1.88 ! xsa 1333: .Pp
! 1334: There is no way to remove a directory with the
! 1335: .Ic remove
! 1336: command.
! 1337: .Nm
! 1338: will only remove a directory if it is empty and if the
! 1339: .Ic checkout
! 1340: or
! 1341: .Ic update
! 1342: commands are run with the
! 1343: .Fl P
! 1344: option.
! 1345: (Note that the
! 1346: .Ic export
! 1347: command always removes empty directories.)
1.28 xsa 1348: .Pp
1349: The
1.35 jmc 1350: .Ic remove
1351: command takes the following options:
1352: .Bl -tag -width Ds -offset 3n
1353: .It Fl f
1354: Force local file removal.
1.28 xsa 1355: If this flag is not used, the file must be locally removed beforehand for
1356: the command to be valid.
1.35 jmc 1357: .It Fl l
1358: Limit the scope of the search to the local directory
1359: only and disable recursive behaviour.
1360: .It Fl R
1361: Enable recursive behaviour.
1362: This is the default.
1363: .El
1.18 xsa 1364: .Pp
1365: Aliases:
1.19 xsa 1366: .Ic rm ,
1367: .Ic delete .
1.13 jmc 1368: .It Ic rlog
1369: Print out history information for a module.
1.56 xsa 1370: .It Xo Ic rtag
1.57 xsa 1371: .Op Fl abdFflnR
1.56 xsa 1372: .Oo Fl D Ar date \*(Ba
1373: .Fl r Ar rev Oc
1374: .Ar symbolic_tag
1375: .Ar modules ...
1376: .Xc
1377: The
1378: .Ic rtag
1379: command adds a symbolic tag to one or more modules.
1380: It is often used to create a new branch using the
1381: .Fl b
1382: option.
1383: .Pp
1384: The
1385: .Ic rtag
1386: command takes the following options:
1387: .Bl -tag -width Ds -offset 3n
1388: .It Fl a
1389: Clear tag from files already removed with the
1390: .Ic remove
1391: command.
1392: .It Fl b
1393: Create a branch.
1394: .It Fl D Ar date
1395: Tag the most recent revision before
1396: .Ar date .
1397: .It Fl d
1398: Delete tag.
1399: .It Fl F
1400: Move tag if it already exists.
1401: If this option is not used and a tag is used a second time,
1402: .Nm
1403: will not execute the action.
1404: .It Fl f
1405: Force the use of the head revision if the specified
1406: revision or date is not found.
1407: .It Fl l
1408: Limit the scope of the search to the local directory
1409: only and disable recursive behaviour.
1410: .It Fl n
1411: Do not execute programs listed in the
1412: .Pa CVSROOT/modules
1413: file.
1414: .It Fl R
1415: Enable recursive behaviour.
1416: This is the default.
1417: .It Fl r Ar rev
1418: Tag at revision
1419: .Ar rev .
1420: .El
1421: .Pp
1422: Aliases:
1423: .Ic rt ,
1424: .Ic rfreeze .
1.13 jmc 1425: .It Ic server
1426: Server mode.
1.25 xsa 1427: .It Xo Ic status
1428: .Op Fl lRv
1429: .Op Ar file ...
1430: .Xc
1431: The
1432: .Ic status
1433: command is used to display the state of checked out files.
1434: .Pp
1435: The
1.35 jmc 1436: .Ic status
1437: command takes the following options:
1438: .Bl -tag -width Ds -offset 3n
1439: .It Fl l
1440: Limit the scope of the search to the local directory
1441: only and disable recursive behaviour.
1442: .It Fl R
1443: Enable recursive behaviour.
1444: This is the default.
1445: .It Fl v
1446: Display symbolic tags for
1447: .Ar file .
1.25 xsa 1448: .Pp
1.35 jmc 1449: The state may be one of the following:
1.61 deraadt 1450: .Bl -tag -width Ds
1.25 xsa 1451: .It Cm Locally Added
1452: The file has been added with the
1453: .Ic add
1454: command, but has not been committed to the repository with the
1455: .Ic commit
1456: command.
1457: .It Cm Locally Modified
1.35 jmc 1458: The file is up to date, but has been locally modified.
1.25 xsa 1459: .It Cm Locally Removed
1460: The file has been removed with the
1461: .Ic remove
1462: command, but has not been committed to the repository with the
1463: .Ic commit
1464: command.
1465: .It Cm Needs Checkout
1466: The file has not been modified; a new version is available.
1467: .It Cm Needs Merge
1468: The file has been modified and a newer version is available.
1469: .It Cm Needs Patch
1470: Same as
1471: .Ic Needs Checkout
1472: but, in client-server mode, only the differences are sent to save
1473: network resources.
1474: .It Cm Unresolved Conflict
1475: A merge has been done, but unresolved conflicts still remain.
1476: .It Cm Up-to-date
1477: The file is up to date.
1478: .El
1.35 jmc 1479: .El
1.13 jmc 1480: .Pp
1481: Aliases:
1482: .Ic st ,
1483: .Ic stat .
1.21 jmc 1484: .It Xo Ic tag
1.58 jmc 1485: .Op Fl bcdFflR
1.57 xsa 1486: .Oo Fl D Ar date \*(Ba
1487: .Fl r Ar rev Oc
1.21 jmc 1488: .Op Ar symbolic_tag
1489: .Op Ar file ...
1490: .Xc
1491: .Pp
1.57 xsa 1492: The
1493: .Ic tag
1494: command adds a symbolic tag to a checked out version of one or more files.
1.21 jmc 1495: .Pp
1496: The
1.35 jmc 1497: .Ic tag
1498: command takes the following options:
1499: .Bl -tag -width Ds -offset 3n
1500: .It Fl b
1.57 xsa 1501: Create a branch.
1502: .It Fl c
1503: Check that working files are not modified.
1504: .It Fl D Ar date
1505: Tag the most recent revision before
1506: .Ar date .
1.35 jmc 1507: .It Fl d
1508: Delete tag.
1.57 xsa 1509: .It Fl F
1510: Move tag if it already exists.
1511: If this option is not used and a tag is used a second time,
1512: .Nm
1513: will not execute the action.
1514: .It Fl f
1515: Force the use of the head revision if the specified
1516: revision or date is not found.
1.35 jmc 1517: .It Fl l
1518: Limit the scope of the search to the local directory
1519: only and disable recursive behaviour.
1520: .It Fl R
1521: Enable recursive behaviour.
1522: This is the default.
1.57 xsa 1523: .It Fl r Ar rev
1524: Tag at revision
1525: .Ar rev .
1.35 jmc 1526: .El
1.13 jmc 1527: .Pp
1528: Aliases:
1529: .Ic ta ,
1530: .Ic freeze .
1.30 xsa 1531: .It Xo Ic unedit Op Fl lR
1532: .Op Ar file ...
1533: .Xc
1534: .Pp
1535: The
1536: .Ic unedit
1537: command is used to give up an edition on a file and thus cancel
1538: the wanted temporary notifications.
1539: If the file has been modified since the
1.13 jmc 1540: .Ic edit
1.30 xsa 1541: command has been issued,
1542: .Nm
1543: will ask if you want to go back to the previous version, and lose the
1544: modifications done on the file, or stay in edition mode on it.
1545: .Pp
1546: The
1.35 jmc 1547: .Ic unedit
1548: command takes the following options:
1549: .Bl -tag -width Ds -offset 3n
1550: .It Fl l
1551: Limit the scope of the search to the local directory
1552: only and disable recursive behaviour.
1553: .It Fl R
1554: Enable recursive behaviour.
1555: This is the default.
1556: .El
1.11 jmc 1557: .It Xo Ic update
1.38 xsa 1558: .Op Fl AdflPpR
1559: .Oo Fl D Ar date \*(Ba
1560: .Fl r Ar rev Oc
1561: .Op Fl I Ar ign
1562: .Op Fl j Ar rev
1563: .Op Fl k Ar mode
1564: .Op Fl W Ar spec
1.4 jfb 1565: .Op Ar file ...
1.3 jfb 1566: .Xc
1.7 jfb 1567: .Pp
1.3 jfb 1568: The
1.11 jmc 1569: .Ic update
1.17 david 1570: command is used to merge any of the changes that have occurred on the remote
1.3 jfb 1571: repository into the local one where the command was run.
1572: .Pp
1573: The
1.35 jmc 1574: .Ic update
1575: command takes the following options:
1576: .Bl -tag -width Ds -offset 3n
1577: .It Fl A
1.41 xsa 1578: Reset any sticky tags, dates, or keyword substitution modes that
1579: have been set on the tree.
1.38 xsa 1580: .It Fl D Ar date
1581: Update as of the latest revision no later than
1582: .Ar date
1583: (is sticky).
1584: .It Fl d
1585: Create any new directories.
1586: Without this option,
1587: .Nm
1588: does not create any new files sitting in these new directories
1589: added in the base repository since the last update of the working
1590: copy, or since the last update with the
1591: .Fl d
1592: option.
1593: .It Fl f
1594: Force the use of the head revision if the specified
1595: tag or date is not found.
1596: .It Fl I Ar ign
1597: Ignore files specified by
1598: .Ar ign .
1599: This option can be used several times on the command line.
1600: To see all files, use the
1601: .Fl I Ar !\&
1602: specification.
1603: .It Fl j Ar rev
1604: Merge in changes made between current revision and
1605: .Ar rev .
1606: If two
1607: .Fl j
1608: options are specified, only merge the differences between the two
1609: revisions of the branch.
1610: This allows successive merges without having to resolve
1611: already resolved conflicts again.
1612: .It Fl k Ar mode
1613: Specify the keyword substitution mode (is sticky).
1.35 jmc 1614: .It Fl l
1615: Limit the scope of the search to the local directory
1616: only and disable recursive behaviour.
1617: .It Fl P
1618: Prune any directories that have become empty as a result of the update.
1.38 xsa 1619: .It Fl p
1620: Send the result of the update to standard output (avoids stickiness).
1.35 jmc 1621: .It Fl R
1622: Enable recursive behaviour.
1623: This is the default.
1.38 xsa 1624: .It Fl r Ar rev
1625: Update from a particular revision or branch (is sticky).
1626: .It Fl W Ar spec
1627: Wrappers specification line.
1.35 jmc 1628: .El
1.38 xsa 1629: .Pp
1630: By default, the
1631: .Ic update
1632: command does not create new directories; the
1633: .Fl d
1634: option must be used for that.
1.29 xsa 1635: .Pp
1636: For each file updated, a single letter prefix is given to
1637: specify the state of the file.
1638: The possible prefixes are as follows:
1.61 deraadt 1639: .Bl -tag -width Ds
1.29 xsa 1640: .It \&?
1641: The file is unknown to
1642: .Nm .
1643: .It A
1644: The file has been added with the
1645: .Ic add
1646: command, but has not been committed to the repository with the
1647: .Ic commit
1648: command.
1649: .It C
1650: A merge, with a more recent version of the file, has been done,
1651: but unresolved conflicts still remain.
1652: .It M
1653: The file has been locally modified; if a more recent version
1654: is available, the merge has been done without conflict.
1655: .It P
1656: The same as
1657: .Sq U ,
1658: but, in client-server mode, only differences are sent to save network
1659: resources.
1660: .It R
1661: The file has been removed with the
1662: .Ic remove
1663: command, but has not been committed to the repository with the
1664: .Ic commit
1665: command.
1666: .It U
1667: The file is up to date.
1668: .El
1.13 jmc 1669: .Pp
1670: Aliases:
1671: .Ic up ,
1672: .Ic upd .
1.11 jmc 1673: .It Ic version
1.3 jfb 1674: Causes
1675: .Nm
1676: to print its version information.
1.14 jfb 1677: If this command is issued within a local copy of a remote repository or
1678: if either the
1679: .Ev CVSROOT
1680: environment variable or the
1681: .Fl d
1682: flag specify a remote repository,
1.3 jfb 1683: .Nm
1684: will also connect to the server and ask it to print its version information.
1.13 jmc 1685: .Pp
1686: Aliases:
1687: .Ic ve ,
1688: .Ic ver .
1.32 xsa 1689: .It Xo Ic watch
1690: .Ar on | off | add | remove
1691: .Op Fl lR
1692: .Op Fl a Ar action
1693: .Op Ar file ...
1694: .Xc
1695: .Pp
1696: The
1697: .Ic watch
1698: command switches a file from normal mode to
1699: pseudo-lock mode as well as handling the notifications associated
1700: with it.
1701: Pseudo-lock mode means knowing who is editing a file:
1702: for that,
1703: .Nm
1704: extracts the file in read-only mode.
1705: Users must use the
1706: .Ic edit
1707: command to get the editing rights on the file.
1708: .Pp
1709: One of the following arguments to the
1710: .Ic watch
1711: command is mandatory: on, off, add, or remove.
1712: .Ar on
1713: switches the file into pseudo-lock mode;
1714: .Ar off
1715: switches it back to normal mode;
1716: .Ar add
1717: adds notifications for specific actions on the file;
1718: .Ar remove
1719: removes those notifications.
1720: .Pp
1721: The notifications are permanent.
1722: They remain in place until the
1723: .Ic watch remove
1724: command is issued while the temporary notifications are
1725: made available with the
1726: .Ic edit
1727: command.
1728: .Pp
1729: The
1.35 jmc 1730: .Ic watch
1731: command takes the following options:
1732: .Bl -tag -width Ds -offset 3n
1733: .It Fl a Ar action
1734: Specify the permanent notification wanted for
1.32 xsa 1735: .Ar add | remove :
1736: .Pp
1.61 deraadt 1737: .Bl -tag -width Ds -compact
1.32 xsa 1738: .It Cm commit
1.35 jmc 1739: Another user has committed changes to the file.
1.32 xsa 1740: .It Cm edit
1.35 jmc 1741: Another user is editing the file.
1.32 xsa 1742: .It Cm unedit
1.35 jmc 1743: Another user has finished editing the file.
1.32 xsa 1744: .It Cm all
1745: All of the above.
1746: .It Cm none
1747: No notification.
1748: .El
1749: .Pp
1.35 jmc 1750: If no specification is requested using the
1.32 xsa 1751: .Ar add
1752: or
1753: .Ar remove
1754: arguments, it implies the
1755: .Fl a Ar all
1756: option.
1.35 jmc 1757: .It Fl l
1758: Limit the scope of the search to the local directory
1759: only and disable recursive behaviour.
1760: .It Fl R
1761: Enable recursive behaviour.
1762: This is the default.
1763: .El
1.32 xsa 1764: .It Xo Ic watchers
1765: .Op Fl lR
1766: .Op Ar file ...
1767: .Xc
1768: .Pp
1769: The
1770: .Ic watchers
1771: command lists the users who asked for notifications as well as the
1772: notifications details.
1773: The possible notifications are as follows:
1.61 deraadt 1774: .Bl -tag -width Ds
1.32 xsa 1775: .It Cm commit
1776: Permanent watch of a commit of a new version of a file.
1777: .It Cm edit
1778: Permanent watch of the start of file edition.
1779: .It Cm tcommit
1780: Temporary watch of a commit of new version of a file.
1781: .It Cm tedit
1782: Temporary watch of the start of file edition.
1783: .It Cm tunedit
1784: Temporary watch of the end of file edition.
1785: .It Cm unedit
1786: Permanent watch of the end of file edition.
1787: .El
1788: .Pp
1789: The temporary watches are set using the
1790: .Ic edit
1791: command, until the
1792: .Ic commit
1793: or
1794: .Ic unedit
1.35 jmc 1795: command is issued on a file.
1796: .Pp
1797: The
1798: .Ic watchers
1799: command takes the following options:
1800: .Bl -tag -width Ds -offset 3n
1801: .It Fl l
1802: Limit the scope of the search to the local directory
1803: only and disable recursive behaviour.
1804: .It Fl R
1805: Enable recursive behaviour.
1806: This is the default.
1807: .El
1.1 jfb 1808: .El
1809: .Sh ENVIRONMENT
1.61 deraadt 1810: .Bl -tag -width Ds
1.8 jmc 1811: .It Ev CVS_CLIENT_LOG
1812: This variable enables logging of all communications between the client and
1813: server when running in non-local mode.
1814: If set, this environment variable must contain a base path from which two
1815: paths will be generated by appending ".in" to the value for the server's
1816: input and ".out" for the server's output.
1.64 joris 1817: .Pp
1.65 joris 1818: The path can contain the following substitutes:
1819: .Pp
1820: .Bl -tag -width Ds -offset indent -compact
1.64 joris 1821: .It %c
1.65 joris 1822: the command being run
1.64 joris 1823: .It %d
1.65 joris 1824: the date
1825: .It %p
1826: the process ID
1.64 joris 1827: .It %u
1.65 joris 1828: the username of the person running it
1.64 joris 1829: .El
1830: .Pp
1831: The substitutes are only supported by OpenCVS.
1.1 jfb 1832: .It Ev CVS_RSH
1833: Name of the program to use when connecting to the server through a remote
1834: shell.
1835: The default is to use the
1836: .Xr ssh 1
1837: program.
1838: .It Ev CVS_SERVER
1839: If set, gives the name of the program to invoke as a
1840: .Nm
1841: server when using remote shell.
1842: The default is to use `cvs'.
1843: .It Ev CVSEDITOR
1844: Name of the editor to use when editing commit messages.
1.8 jmc 1845: Checked before
1846: .Ev EDITOR
1847: and
1848: .Ev VISUAL .
1.70 xsa 1849: .It Ev CVSREAD
1850: If set,
1851: .Nm
1852: extracts files in read-only mode.
1.8 jmc 1853: .It Ev CVSROOT
1854: When set, this variable should contain the string pointing to the root
1855: directory of the CVS repository.
1856: The contents of this variable are ignored when the
1857: .Fl d
1858: option is given or if `Root' files exist in the checked-out copy.
1.1 jfb 1859: .It Ev EDITOR
1.9 jmc 1860: Name of the editor to use when editing commit messages.
1861: This is traditionally a line-oriented editor,
1862: such as
1863: .Xr ex 1 .
1.74 xsa 1864: .It Ev HOME
1865: Directory where the
1866: .Pa .cvsignore
1867: and
1868: .Pa .cvsrc
1869: files are searched for.
1.77 xsa 1870: .It Ev TMPDIR
1.79 xsa 1871: When set, this variable specifies the directory where temporary files
1.77 xsa 1872: are to be created.
1873: The default is set to
1874: .Pa /tmp .
1.1 jfb 1875: .It Ev VISUAL
1.9 jmc 1876: Name of the editor to use when editing commit messages.
1877: This is traditionally a screen-oriented editor,
1878: such as
1879: .Xr vi 1 .
1.8 jmc 1880: .El
1881: .Sh FILES
1882: .Bl -tag -width Ds
1.75 xsa 1883: .It Pa $HOME/.cvsignore
1884: File containing a list of files (or
1885: .Xr sh 1
1886: file name patterns) that should be ignored by
1.76 jmc 1887: .Nm
1.75 xsa 1888: during the
1889: .Ic import ,
1890: .Ic release ,
1891: and
1892: .Ic update
1893: commands.
1.8 jmc 1894: .It Pa $HOME/.cvsrc
1895: File containing a list of implicit options to pass to certain commands.
1896: This file is read on startup unless the
1897: .Fl f
1898: option is specified.
1899: .It Pa $CVSROOT/CVSROOT
1900: Directory containing repository administrative files.
1.86 xsa 1901: .It Pa $CVSROOT/CVSROOT/history
1902: File containing reports of
1903: .Ic checkout ,
1904: .Ic commit ,
1905: .Ic export ,
1906: .Ic release ,
1907: .Ic rtag ,
1908: and
1909: .Ic update
1910: commands that have been issued.
1911: By default, the
1912: .Ic init
1913: command creates the
1914: .Pa history
1915: file.
1916: To disable history logging, the
1917: .Pa history
1918: file should be removed manually.
1919: The
1920: .Ic history
1921: command shows these reports according to several criteria.
1.8 jmc 1922: .It Pa $CVSROOT/CVSROOT/loginfo
1923: File containing associations between modules and handlers for
1924: post-commit logging.
1.85 xsa 1925: .El
1926: .Pp
1927: Each directory that is managed by
1928: .Nm
1929: contains a
1930: .Pa CVS
1931: directory.
1932: This directory is used by various
1933: .Nm
1934: commands to record the status of files in the current working directory.
1935: These files should not be modified manually by the user but by the
1936: .Nm
1937: commands instead.
1938: Files that are always stored in every
1939: .Pa CVS
1940: directory are as follows:
1941: .Bl -tag -width Ds
1942: .It Pa CVS/Entries
1943: File containing a list of files managed by
1944: .Nm .
1945: .Pa Entries
1946: has one line per file or directory describing the state of it with
1947: regard to the source repository.
1948: These lines have the following format:
1949: .Pp
1950: .Dl /name/revision/timestamp/options/tag
1951: .Bl -tag -width Ds
1952: .It name
1953: Name of the file in the directory.
1954: .It revision
1955: Revision of the file in the working directory.
1956: The revision is equal to
1957: .Sq 0
1958: if the file has been added with the
1959: .Ic add
1.87 jmc 1960: command or preceded by the
1.85 xsa 1961: .Sq -
1962: character if the file has been removed with the
1963: .Ic remove
1964: command.
1965: .It timestamp
1966: Contains the timestamp of the file at the time
1967: .Nm
1968: created it.
1969: If the timestamp is different from the actual modification time of the file,
1970: it means that the file has been modified.
1971: .It options
1972: Contains the keyword substitution mode used for this file.
1973: .It tag
1974: Contains
1975: .Sq T
1976: followed by a tagname or
1977: .Sq D
1978: followed by a date.
1979: .El
1980: .Pp
1981: Entries corresponding to directories have the following format:
1982: .Pp
1983: .Dl D/name////
1984: .Pp
1985: The lines in the
1986: .Pa Entries
1987: file can be in any order.
1988: .It Pa CVS/Repository
1989: File containing the path to the corresponding directory in the
1990: source repository.
1991: .It Pa CVS/Root
1992: File containing the value of the
1993: .Ev CVSROOT
1994: variable at the time of checkout.
1995: This file is used by all
1996: .Nm
1997: commands instead of
1998: .Ev CVSROOT
1999: once
2000: .Nm
2001: has checked for its existence.
2002: .El
2003: .Pp
2004: Depending on the circumstances, other files may exist in the
2005: .Pa CVS
2006: directory:
2007: .Bl -tag -width Ds
2008: .It Pa CVS/Base
2009: If pseudo-lock mode is enabled in client-server mode,
2010: the
2011: .Pa Base
2012: directory contains a copy of the file on which the
2013: .Ic edit
2014: command has been issued.
2015: This allows the
2016: .Ic unedit
2017: command to operate even if the CVS server is unreachable.
2018: .It Pa CVS/Baserev
2019: File listing the revisions for each file contained in the
2020: .Pa Base
2021: directory under the following format:
2022: .Pp
2023: .Dl name/revision/
2024: .It Pa CVS/Checkin.prog
2025: File containing the path to the command specified with the
2026: .Fl i
2027: option in the
2028: .Pa CVSROOT/modules
2029: file.
2030: .It Pa CVS/Entries.Static
2031: Tells
2032: .Nm
2033: to not add files to the directory unless the
2034: .Ic update
2035: command is issued with the
2036: .Fl d
2037: option.
2038: .It Pa CVS/Notify
2039: File containing the notifications that could not be sent to the
2040: CVS server but will be sent at the next successful connection.
2041: .It Pa CVS/Tag
2042: File containing the symbolic revision that was used at checkout.
2043: .It Pa CVS/Update.prog
2044: File containing the path to the command specified with the
2045: .Fl u
2046: option in the
2047: .Pa CVSROOT/modules
2048: file.
2049: .It Pa CVS/<name>,t
2050: File containing the description of the file
2051: .Pa file
2052: that has been added with the
2053: .Ic add
2054: command.
2055: This description is used by
2056: .Nm
2057: when archiving this file with the
2058: .Ic commit
2059: command.
1.81 xsa 2060: .El
2061: .Sh DIAGNOSTICS
2062: The
2063: .Nm
2064: utility exits 0 on success, or with one of the following return codes.
2065: The numerical values corresponding to the symbolic ones are given in
2066: parentheses for easy reference.
2067: .Bl -tag -width Ds
2068: .It Dv CVS_EX_USAGE Pq 1
2069: The
2070: .Nm
2071: command was used incorrectly.
2072: Either with the wrong number of arguments, a bad flag, a bad syntax in
2073: a parameter, etc...
2074: .It Dv CVS_EX_DATA Pq 2
2075: The input data was incorrect in some way.
2076: .It Dv CVS_EX_PROTO Pq 3
2077: The remote system returned something that was not possible during
2078: a protocol exchange.
2079: .It Dv CVS_EX_FILE Pq 4
2080: An error occurred while doing an operation on a file.
2081: .It Dv CVS_EX_BADTAG Pq 5
1.82 jmc 2082: An error occurred while doing a tagging/untagging operation.
1.81 xsa 2083: .It Dv CVS_EX_BADROOT Pq 6
2084: The
2085: .Ev CVSROOT
2086: was not given or does not match the expected format.
1.1 jfb 2087: .El
2088: .Sh SEE ALSO
2089: .Xr diff 1 ,
1.15 jmc 2090: .Xr gzip 1 ,
1.1 jfb 2091: .Xr patch 1 ,
1.8 jmc 2092: .Xr rcs 1 ,
1.73 xsa 2093: .Xr cvsignore 5 ,
1.16 jmc 2094: .Xr cvsrc 5 ,
1.80 xsa 2095: .Xr cvswrappers 5 ,
1.62 xsa 2096: .Xr cvsintro 7
1.8 jmc 2097: .Sh HISTORY
2098: The OpenCVS project is a BSD-licensed rewrite of the original
2099: Concurrent Versioning System written by Jean-Francois Brousseau.
2100: The original CVS code was written in large parts by Dick Grune,
2101: Brian Berliner and Jeff Polk.
2102: .Sh AUTHORS
2103: .An Jean-Francois Brousseau
2104: .An Vincent Labrecque
2105: .An Joris Vink
1.43 jfb 2106: .An Xavier Santolaria
1.2 jfb 2107: .Sh CAVEATS
2108: This CVS implementation does not fully conform to the GNU CVS version.
1.3 jfb 2109: In some cases, this was done explicitly because GNU CVS has inconsistencies
1.2 jfb 2110: or ambiguous behaviour.
1.3 jfb 2111: Some things have also been left out or modified to enhance the overall
2112: security of the system.
2113: .Pp
2114: Among other things, support for the pserver connection mechanism has been
2115: dropped because of security issues with the authentication mechanism.