Annotation of src/usr.bin/cvs/cvs.1, Revision 1.46
1.46 ! xsa 1: .\" $OpenBSD: cvs.1,v 1.45 2005/02/09 16:11:15 xsa 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.3 jfb 32: .Nd OpenCVS Concurrent Versioning System client
1.1 jfb 33: .Sh SYNOPSIS
34: .Nm
1.15 jmc 35: .Op Fl flQqtv
1.1 jfb 36: .Op Fl d Ar root
37: .Op Fl e Ar editor
1.20 jmc 38: .Xo
39: .Oo Fl s
40: .Ar var Ns = Ns Ar val Oc
41: .Xc
1.15 jmc 42: .Op Fl z Ar level
1.1 jfb 43: .Ar command Op Ar ...
44: .Sh DESCRIPTION
45: The
46: .Nm
47: program acts as both client and server for the use of and administration of
48: a CVS source repository.
49: CVS is used to maintain version information on files that are kept in a
50: repository.
51: Although it is more commonly used to track changes in source code, there
52: are no real limitations to the type of files that you can store in a
53: repository.
1.35 jmc 54: For a general introduction to CVS, see
55: .Xr cvsintro 7 .
1.1 jfb 56: .Pp
1.7 jfb 57: .Nm
1.35 jmc 58: reads its startup configuration file,
59: .Pa .cvsrc ,
1.7 jfb 60: from the home directory of the user who invoked it.
61: This file is used to specify implicit options passed to
62: .Nm
63: or one of its commands whenever it is invoked.
1.35 jmc 64: The defaults in the configuration file can be overridden with the
65: .Fl f
66: option (see below).
1.16 jmc 67: See
68: .Xr cvsrc 5
69: for further information.
1.7 jfb 70: .Pp
1.1 jfb 71: The following options are supported:
1.15 jmc 72: .Bl -tag -width "-e editorXX"
1.1 jfb 73: .It Fl d Ar root
74: Use
75: .Ar root
76: as the path to the root directory of the CVS repository.
77: The value must specify an absolute path.
78: .It Fl e Ar editor
79: Use the program
80: .Ar editor
81: whenever editing log information.
1.8 jmc 82: This option overrides the environment variables CVSEDITOR, VISUAL, and EDITOR.
1.1 jfb 83: .It Fl f
1.7 jfb 84: Do not read the user's configuration file on startup.
1.1 jfb 85: .It Fl l
86: Suppress logging of history information.
87: .It Fl Q
88: Be extra quiet.
89: Only error messages will be displayed.
90: .It Fl q
91: Be quiet about reporting.
1.20 jmc 92: .It Fl s Ar var Ns = Ns Ar val
93: Set the value of the internal variable
94: .Ar var
95: to the string
96: .Ar val .
1.15 jmc 97: .It Fl t
98: Trace program execution.
1.1 jfb 99: .It Fl v
100: Display version information and exit.
1.15 jmc 101: .It Fl z Ar level
102: Specify the compression level to
103: .Xr gzip 1
104: when transferring files.
105: The compression level ranges from 1 to 9,
106: with 1 being the fastest,
107: and 9 providing the best level of compression.
108: The default is 6.
1.45 xsa 109: .El
110: .Sh KEYWORD SUBSTITUTION
111: As long as you edit source files inside a working directory you
112: can always find out the state of your files via the
113: .Ic status
114: or
115: .Ic log
116: commands, but as soon as files get exported from
117: your local working copy, it becomes harder to identify which
118: revisions they are.
119: .Pp
120: .Nm
121: can use a mechanism known as
122: .Sq keyword substitution
123: to help identify the files.
124: Embedded strings of the form $keyword$ and $keyword:...$ in a file
125: are replaced with strings of the form $keyword: value$ whenever you
126: obtain a new revision of the file.
127: The possible keywords are as follows:
128: .Bl -tag -width "RevisionXXX"
1.46 ! xsa 129: .It \&$Author\&$
1.45 xsa 130: The name of the user who checked in the revision.
1.46 ! xsa 131: .It \&$Date\&$
1.45 xsa 132: The date and hour (UTC) the revision was checked in.
1.46 ! xsa 133: .It \&$Header\&$
1.45 xsa 134: Standard header containing the full pathname of the RCS
135: file, the revision number, the date (UTC), the author and the state.
1.46 ! xsa 136: .It \&$Id\&$
1.45 xsa 137: The same content as $Header$ but without the path
138: of the RCS file.
1.46 ! xsa 139: .It \&$Log\&$
1.45 xsa 140: The log message supplied during commit, preceded by a header
141: containing the RCS filename, the revision number, the
142: author, and the date (UTC).
1.46 ! xsa 143: .It \&$Name\&$
1.45 xsa 144: The tag name used to check out the file.
1.46 ! xsa 145: .It \&$RCSfile\&$
1.45 xsa 146: The name of the RCS file, but without a path.
1.46 ! xsa 147: .It \&$Revision\&$
1.45 xsa 148: The revision number assigned to the revision.
1.46 ! xsa 149: .It \&$Source\&$
1.45 xsa 150: The full pathname of the RCS file.
1.46 ! xsa 151: .It \&$State\&$
1.45 xsa 152: The state assigned to the revision.
153: .El
154: .Pp
155: Keyword substitution has its disadvantages: sometimes the
1.46 ! xsa 156: literal text string \&$Author\&$ is wanted inside a file without
1.45 xsa 157: .Nm
158: interpreting it as a keyword and expanding it into something like
1.46 ! xsa 159: \&$Author\&$.
1.45 xsa 160: The
161: .Fl k Ar o
162: option can be used to turn off keyword substitution entirely though.
163: There is unfortunately no way to selectively turn off keyword substitution.
164: .Pp
165: Each file and working directory copy of a file have a stored
166: default substitution mode.
167: Substitution modes on files are set by the
168: .Fl k Ar mode
169: option to the
170: .Ic add
171: and
172: .Ic admin
173: commands or by the
174: .Fl k Ar mode
175: or
176: .Fl A
177: options to the
178: .Ic checkout
179: or
180: .Ic update
181: commands.
182: .Pp
183: The possible substitution modes are as follows:
184: .Bl -tag -width Ds -offset 3n
185: .It Fl k Ar b
186: Like
187: .Fl k Ar o ,
188: but also avoids the conversion of line endings.
189: This option is used to handle binary files.
190: .It Fl k Ar k
191: Does not substitute the keywords.
192: Useful with the
193: .Ic diff
194: command to avoid displaying the differences between keyword substitutions.
195: .It Fl k Ar kv
196: The default behaviour.
1.46 ! xsa 197: Keywords are normally substituted i.e. \&$Revision\&$ becomes $Revision: 1.1 $.
1.45 xsa 198: .It Fl k Ar kvl
199: Like
200: .Fl k Ar kv ,
201: except that the locker's name is displayed along with the version
202: if the given revision is currently locked.
203: This option is normally not useful as
204: .Nm
205: does not use file locking by default.
206: .It Fl k Ar o
207: No substitutions are done.
208: This option is often used with the
209: .Ic import
210: command to guarantee that files that already contain external keywords
211: do not get modified.
212: .It Fl k Ar v
213: Substitue the value of keywords instead of keywords themselves
1.46 ! xsa 214: e.g. instead of \&$Revision\&$, only insert 1.1 and not $Revision: 1.1 $.
1.45 xsa 215: This option must be used with care, as it can only be used once.
216: It is often used with the
217: .Ic export
218: command to freeze the values before releasing software.
1.1 jfb 219: .El
220: .Sh COMMANDS
1.3 jfb 221: The following commands are supported by
1.44 jmc 222: .Nm :
1.7 jfb 223: .Bl -tag -width "xxxxxxxxxxxx"
1.42 xsa 224: .It Xo Ic add
225: .Op Fl k Ar mode
226: .Op Fl m Ar msg
227: .Ar file ...
1.3 jfb 228: .Xc
1.7 jfb 229: .Pp
1.42 xsa 230: Before a file is known to
231: .Nm ,
232: it must be added to the repository using this command.
1.1 jfb 233: Adding a file does not actually publish the contents of the
1.42 xsa 234: file: the
1.11 jmc 235: .Ic commit
1.42 xsa 236: command must also be used to publish it into the repository,
237: and thus let others access the file.
238: .Pp
239: Note: since directories have no versioning system, it is sufficient
240: to add them with the
241: .Ic add
242: command alone; the
243: .Ic commit
244: command is not necessary.
1.1 jfb 245: .Pp
1.35 jmc 246: The
247: .Ic add
248: command takes the following options:
249: .Bl -tag -width Ds -offset 3n
1.42 xsa 250: .It Fl k Ar mode
251: Specify the keyword substitution mode.
1.35 jmc 252: .It Fl m Ar msg
253: Attach log message
254: .Ar msg .
255: By default, no log message is required.
256: .El
1.13 jmc 257: .Pp
258: Aliases:
259: .Ic ad ,
260: .Ic new .
261: .It Ic admin
262: Administration front-end for
263: .Xr rcs 1 .
264: .Pp
265: Aliases:
266: .Ic adm ,
267: .Ic rcs .
1.26 xsa 268: .It Xo Ic annotate
269: .Op Fl flR
270: .Oo Fl D Ar date \*(Ba
271: .Fl r Ar rev Oc
272: .Op Ar file ...
273: .Xc
274: .Pp
1.23 xsa 275: For each line of any files specified, show information about its
276: last revision.
277: The information given is the last revision when a modification occurred,
278: the author's name, and the date of the revision.
1.26 xsa 279: .Pp
280: The
1.35 jmc 281: .Ic annotate
282: command takes the following options:
283: .Bl -tag -width Ds -offset 3n
284: .It Fl D Ar date
285: Show the annotations as of the latest revision no later than
286: .Ar date .
287: .It Fl f
288: Force the use of the head revision if the specified
1.26 xsa 289: tag or date is not found.
290: This can be used in combination with
291: .Fl D
292: or
293: .Fl r
294: to ensure that there is some output from the
295: .Ic annotate
296: command, even if only to show Revision 1.1 of the file.
1.35 jmc 297: .It Fl l
298: Limit the scope of the search to the local directory
299: only and disable recursive behaviour.
300: .It Fl R
301: Enable recursive behaviour.
302: This is the default.
303: .It Fl r Ar rev
304: Show annotations as of revision
1.26 xsa 305: .Ar rev
306: (can be a revision number or a tag).
1.35 jmc 307: .El
1.13 jmc 308: .Pp
309: Aliases:
310: .Ic ann .
1.11 jmc 311: .It Xo Ic checkout
1.37 xsa 312: .Op Fl AcflNnPpRs
313: .Op Fl d Ar dir
314: .Op Fl j Ar rev
315: .Op Fl k Ar mode
316: .Fl D Ar date \*(Ba
317: .Fl r Ar rev
318: .Ar module ...
1.7 jfb 319: .Xc
320: .Pp
321: The
1.11 jmc 322: .Ic checkout
1.7 jfb 323: command is used to create a local copy of one or more modules present on the
324: target CVS repository.
1.37 xsa 325: .Pp
326: The
327: .Ic checkout
328: command takes the following options:
329: .Bl -tag -width Ds -offset 3n
330: .It Fl A
1.41 xsa 331: Reset any sticky tags, dates, or keyword substitution modes that
332: have been set on the tree.
1.37 xsa 333: .It Fl c
334: Display the list of available modules.
335: .It Fl D Ar date
336: Check out as of the latest revision no later than
337: .Ar date
338: (is sticky).
339: .It Fl d Ar dir
340: Check out in directory
341: .Ar dir
342: instead of the directory bearing the same name as the
343: .Ar module .
344: .It Fl f
345: Force the use of the head revision if the specified
346: tag or date is not found.
347: .It Fl j Ar rev
348: Merge in changes made between current revision and
349: .Ar rev .
350: If two
351: .Fl j
352: options are specified, only merge the differences between the two
353: revisions of the branch.
354: This allows successive merges without having to resolve
355: already resolved conflicts again.
356: .It Fl k Ar mode
357: Specify the keyword substitution mode (is sticky).
358: .It Fl l
359: Limit the scope of the search to the local directory
360: only and disable recursive behaviour.
361: .It Fl N
362: If used in conjunction with the
363: .Fl d
364: option, files are placed in local directory
365: .Ar module ,
366: located in directory
367: .Ar dir .
368: .It Fl n
369: Do not execute programs listed in the
370: .Pa CVSROOT/modules
371: file.
372: .It Fl P
373: Prune empty directories.
374: .It Fl p
375: Check out files to standard output (avoids stickiness).
376: .It Fl R
377: Enable recursive behaviour.
378: This is the default.
379: .It Fl r Ar rev
380: Check out from a particular revision or branch (implies
381: .Fl P )
382: (is sticky).
383: .It Fl s
384: Like
385: .Fl c ,
386: but include module status.
387: .El
1.13 jmc 388: .Pp
389: Aliases:
390: .Ic co ,
391: .Ic get .
1.11 jmc 392: .It Xo Ic commit
1.3 jfb 393: .Op Fl flnR
1.27 xsa 394: .Oo Fl F Ar logfile \*(Ba
395: .Fl m Ar msg Oc
1.3 jfb 396: .Op Fl r Ar rev
1.4 jfb 397: .Op Ar file ...
1.3 jfb 398: .Xc
1.7 jfb 399: .Pp
1.1 jfb 400: The
1.11 jmc 401: .Ic commit
1.1 jfb 402: command is used to send local changes back to the server and update the
403: repository's information to reflect the changes.
1.27 xsa 404: .Pp
405: The
1.35 jmc 406: .Ic commit
407: command takes the following options:
408: .Bl -tag -width Ds -offset 3n
409: .It Fl F Ar logfile
410: Specify a
1.27 xsa 411: .Ar file
1.35 jmc 412: which contains the log message.
413: .It Fl f
414: Force a file to be committed, even though it is unchanged.
415: .It Fl l
416: Limit the scope of the search to the local directory
417: only and disable recursive behaviour.
418: .It Fl m Ar msg
419: Specify a log message on the command line (suppresses the editor invocation).
420: .It Fl n
421: Do not execute programs listed in the
422: .Pa CVSROOT/modules
423: file.
424: .It Fl R
425: Enable recursive behaviour.
426: This is the default.
427: .It Fl r Ar rev
428: Commit to a particular symbolic or numerical revision.
429: .El
1.13 jmc 430: .Pp
431: Aliases:
432: .Ic ci ,
433: .Ic com .
1.24 jfb 434: .It Xo Ic diff Op Fl cilNpu
1.3 jfb 435: .Op Fl D Ar date
436: .Op Fl r Ar rev
1.4 jfb 437: .Op Ar file ...
1.3 jfb 438: .Xc
1.7 jfb 439: .Pp
1.3 jfb 440: The
1.11 jmc 441: .Ic diff
1.3 jfb 442: command is very similar to the
443: .Xr diff 1
1.5 jfb 444: program, except that the differential comparisons that it generates are
1.3 jfb 445: between local or remote revisions of files stored in the CVS repository.
1.13 jmc 446: .Pp
447: Aliases:
448: .Ic di ,
449: .Ic dif .
1.30 xsa 450: .It Xo Ic edit Op Fl lR
451: .Op Fl a Ar action
452: .Op Ar file ...
453: .Xc
454: .Pp
455: The
456: .Ic edit
1.35 jmc 457: command is used to make a file that is being watched
458: (and therefore read-only)
1.30 xsa 459: readable and writable and to inform others that you are planning to edit it.
460: Notifications terminate when the
461: .Ic commit
462: command is issued.
463: Editing rights on the file can be given up using the
464: .Ic unedit
1.35 jmc 465: command, which terminates the temporary notifications.
1.30 xsa 466: .Pp
467: The
1.35 jmc 468: .Ic edit
469: command takes the following options:
470: .Bl -tag -width Ds -offset 3n
471: .It Fl a Ar action
472: Specify the temporary notification wanted:
473: .Pp
474: .Bl -tag -width "commitXX" -compact
1.30 xsa 475: .It Cm commit
1.35 jmc 476: Another user has committed changes to the file.
1.30 xsa 477: .It Cm edit
478: Another user has issued the
479: .Ic edit
1.35 jmc 480: command on the file.
1.30 xsa 481: .It Cm unedit
482: Another user has issued the
483: .Ic unedit
1.35 jmc 484: command on the file.
1.30 xsa 485: .It Cm all
486: All of the above.
487: .It Cm none
488: None of the above.
489: .El
490: .Pp
491: The
492: .Fl a
493: flag may appear more than once, or not at all.
494: If omitted, the action defaults to
1.31 jmc 495: .Cm all .
1.35 jmc 496: .It Fl l
497: Limit the scope of the search to the local directory
498: only and disable recursive behaviour.
499: .It Fl R
500: Enable recursive behaviour.
501: This is the default.
502: .El
1.33 xsa 503: .It Xo Ic editors
504: .Op Fl lR
1.34 xsa 505: .Op Ar file ...
1.33 xsa 506: .Xc
507: .Pp
508: The
509: .Ic editors
510: command lists the users with edition rights on a file.
511: For that, pseudo-lock mode must be enabled (see the
512: .Ic watch
513: command).
514: The e-mail address of the user editing the file, the timestamp
515: when the edition first started, the host from where the edition
516: has been requested and the path to the edited file are listed.
517: .Pp
518: The
1.35 jmc 519: .Ic editors
520: command takes the following options:
521: .Bl -tag -width Ds -offset 3n
522: .It Fl l
523: Limit the scope of the search to the local directory
524: only and disable recursive behaviour.
525: .It Fl R
526: Enable recursive behaviour.
527: This is the default.
528: .El
1.36 xsa 529: .It Xo Ic export
530: .Op Fl flNnR
531: .Op Fl d Ar dir
532: .Op Fl k Ar mode
533: .Fl D Ar date \*(Ba
534: .Fl r Ar rev
535: .Ar module ...
536: .Xc
537: .Pp
538: The
539: .Ic export
540: command extracts a copy of
541: .Ar module
542: without including the directories used for management by
543: .Nm .
544: This eases production of a software release.
545: A date or a revision must be specified for the command to be valid,
546: which ensures that later extractions can be reproduced with the same
547: options as the release.
548: .Pp
549: The checked out module's files will be placed in a directory
550: bearing the same name as the checked out module, by default.
551: .Pp
552: The
553: .Ic export
554: command takes the following options:
555: .Bl -tag -width Ds -offset 3n
556: .It Fl D Ar date
557: Export as of the latest revision no later than
558: .Ar date .
559: .It Fl d Ar dir
560: Export in directory
561: .Ar dir
562: instead of the directory bearing the same name as the
563: .Ar module .
564: .It Fl f
565: Force the use of the head revision if the specified
566: tag or date is not found.
567: This can be used in combination with
568: .Fl D
569: or
570: .Fl r
571: to ensure that the
572: .Ic export
573: command is valid.
574: .It Fl k Ar mode
575: Specify the keyword substitution mode: the
576: .Fl k Ar v
577: option is often used to avoid substitution of keywords during
578: a release cycle.
579: However, be aware that it does not handle an export containing
580: binary files correctly.
581: .It Fl l
582: Limit the scope of the search to the local directory
583: only and disable recursive behaviour.
584: .It Fl N
585: If used in conjunction with the
586: .Fl d
587: option, files are placed in local directory
588: .Ar module ,
589: located in directory
590: .Ar dir .
591: .It Fl n
592: Do not execute programs listed in the
593: .Pa CVSROOT/modules
594: file.
595: .It Fl R
596: Enable recursive behaviour.
597: This is the default.
598: .It Fl r Ar rev
599: Export from a particular symbolic or numerical revision.
600: .El
1.13 jmc 601: .Pp
602: Aliases:
603: .Ic ex ,
604: .Ic exp .
605: .It Ic history
606: Show repository access history.
607: .Pp
608: Aliases:
609: .Ic hi ,
610: .Ic his .
1.22 jmc 611: .It Xo Ic import
612: .Op Fl b Ar branch
613: .Op Fl m Ar msg
614: .Ar repository
615: .Ar vendortag
616: .Ar releasetag
617: .Xc
618: .Pp
1.13 jmc 619: Import sources into CVS using vendor branches.
1.22 jmc 620: .Pp
621: At least three arguments are required:
622: .Ar repository
623: specifies the location of the sources to be imported;
624: .Ar vendortag
625: is a tag for the entire branch;
626: .Ar releasetag
627: is used to identify the files you created with
1.35 jmc 628: .Ic cvs import .
629: .Pp
630: The
631: .Ic import
632: command takes the following options:
633: .Bl -tag -width Ds -offset 3n
634: .It Fl b Ar branch
635: Specify the first-level branch number.
636: .It Fl m Ar msg
637: Specify the log message to send.
638: .El
1.13 jmc 639: .Pp
640: Aliases:
641: .Ic im ,
642: .Ic imp .
643: .It Ic init
644: Create a CVS repository if it doesn't exist.
645: .It Ic kserver
646: Start a Kerberos authentication server.
647: .It Ic log
648: Print out history information for files.
649: .Pp
650: Aliases:
651: .Ic lo .
652: .It Ic login
1.35 jmc 653: Prompt for a password for an authenticating server.
1.13 jmc 654: .It Ic logout
1.35 jmc 655: Remove an entry in
656: .Pa .cvspass
657: for a remote repository.
1.13 jmc 658: .It Ic rdiff
659: Create
660: .Xr patch 1
661: format diffs between releases.
1.39 xsa 662: .It Xo Ic release
663: .Op Fl d
664: .Ar dir ...
665: .Xc
666: The
667: .Ic release
668: command indicates to
669: .Nm
670: that the working copy of a module is no longer in use and checks
671: that non archived modifications in the base repository do exist.
672: This command is not mandatory.
673: Local directories could always be removed without using it, but
674: in this case the handling of history information will no longer be
675: correct (see the
676: .Ic history
677: command).
678: .Pp
679: The
680: .Ic release
681: command takes the following options:
682: .Bl -tag -width Ds -offset 3n
683: .It Fl d Ar dir
684: Remove the directory
685: .Ar dir .
686: Be aware that this option silently removes any directories that have
687: been added to the local working copy without using the
688: .Ic add
689: command.
690: .El
691: .Pp
692: For each file not being synchronized with the base repository,
693: a single letter prefix is given to specify the state of the file.
694: The possible prefixes are as follows:
695: .Bl -tag -width "XXX"
696: .It \&?
697: The file is unknown to
698: .Nm
699: and is not in the list of files to ignore.
700: Any new directories which have not been added with the
701: .Ic add
702: command are silently ignored as well as their content.
703: .It A
704: The file has been added with the
705: .Ic add
706: command, but has not been committed to the repository with the
707: .Ic commit
708: command.
709: .It M
710: The file has been locally modified; a more recent version might
711: exist in the base repository.
712: .It R
713: The file has been removed with the
714: .Ic remove
715: command, but has not been committed to the repository with the
716: .Ic commit
717: command.
718: .It U
719: A more recent version of the file does exist but it is not
720: locally up to date.
721: .El
1.40 xsa 722: .Pp
723: Aliases:
724: .Ic re ,
725: .Ic rel .
1.18 xsa 726: .It Xo Ic remove
727: .Op Fl flR
728: .Op Ar file ...
729: .Xc
730: The
731: .Ic remove
732: command is used to inform
733: .Nm
734: that
735: .Ar file
736: is scheduled to be removed from the repository.
737: Files are not actually removed from the repository until the
738: .Ic commit
739: command has been run subsequently.
1.28 xsa 740: .Pp
741: The
1.35 jmc 742: .Ic remove
743: command takes the following options:
744: .Bl -tag -width Ds -offset 3n
745: .It Fl f
746: Force local file removal.
1.28 xsa 747: If this flag is not used, the file must be locally removed beforehand for
748: the command to be valid.
1.35 jmc 749: .It Fl l
750: Limit the scope of the search to the local directory
751: only and disable recursive behaviour.
752: .It Fl R
753: Enable recursive behaviour.
754: This is the default.
755: .El
1.18 xsa 756: .Pp
757: Aliases:
1.19 xsa 758: .Ic rm ,
759: .Ic delete .
1.13 jmc 760: .It Ic rlog
761: Print out history information for a module.
762: .It Ic rtag
763: Add a symbolic link to a module.
764: .It Ic server
765: Server mode.
1.25 xsa 766: .It Xo Ic status
767: .Op Fl lRv
768: .Op Ar file ...
769: .Xc
770: The
771: .Ic status
772: command is used to display the state of checked out files.
773: .Pp
774: The
1.35 jmc 775: .Ic status
776: command takes the following options:
777: .Bl -tag -width Ds -offset 3n
778: .It Fl l
779: Limit the scope of the search to the local directory
780: only and disable recursive behaviour.
781: .It Fl R
782: Enable recursive behaviour.
783: This is the default.
784: .It Fl v
785: Display symbolic tags for
786: .Ar file .
1.25 xsa 787: .Pp
1.35 jmc 788: The state may be one of the following:
789: .Bl -tag -width "Locally modified"
1.25 xsa 790: .It Cm Locally Added
791: The file has been added with the
792: .Ic add
793: command, but has not been committed to the repository with the
794: .Ic commit
795: command.
796: .It Cm Locally Modified
1.35 jmc 797: The file is up to date, but has been locally modified.
1.25 xsa 798: .It Cm Locally Removed
799: The file has been removed with the
800: .Ic remove
801: command, but has not been committed to the repository with the
802: .Ic commit
803: command.
804: .It Cm Needs Checkout
805: The file has not been modified; a new version is available.
806: .It Cm Needs Merge
807: The file has been modified and a newer version is available.
808: .It Cm Needs Patch
809: Same as
810: .Ic Needs Checkout
811: but, in client-server mode, only the differences are sent to save
812: network resources.
813: .It Cm Unresolved Conflict
814: A merge has been done, but unresolved conflicts still remain.
815: .It Cm Up-to-date
816: The file is up to date.
817: .El
1.35 jmc 818: .El
1.13 jmc 819: .Pp
820: Aliases:
821: .Ic st ,
822: .Ic stat .
1.21 jmc 823: .It Xo Ic tag
1.35 jmc 824: .Op Fl bdlR
1.21 jmc 825: .Op Fl r Ar old_tag
826: .Op Ar symbolic_tag
827: .Op Ar file ...
828: .Xc
829: .Pp
830: Add a symbolic tag to a checked out version of
831: .Ar file .
832: .Pp
833: The
1.35 jmc 834: .Ic tag
835: command takes the following options:
836: .Bl -tag -width Ds -offset 3n
837: .It Fl b
838: Specify a branch tag.
839: .It Fl d
840: Delete tag.
841: .It Fl l
842: Limit the scope of the search to the local directory
843: only and disable recursive behaviour.
844: .It Fl R
845: Enable recursive behaviour.
846: This is the default.
847: .It Fl r Ar old_tag
1.21 jmc 848: .Nm
849: will only tag the files with
850: .Ar symbolic_tag
851: if they are already tagged with
852: .Ar old_tag .
853: When done, it will remove the old tag
854: leaving only the new tag behind on exactly the same files.
1.35 jmc 855: .El
1.13 jmc 856: .Pp
857: Aliases:
858: .Ic ta ,
859: .Ic freeze .
1.30 xsa 860: .It Xo Ic unedit Op Fl lR
861: .Op Ar file ...
862: .Xc
863: .Pp
864: The
865: .Ic unedit
866: command is used to give up an edition on a file and thus cancel
867: the wanted temporary notifications.
868: If the file has been modified since the
1.13 jmc 869: .Ic edit
1.30 xsa 870: command has been issued,
871: .Nm
872: will ask if you want to go back to the previous version, and lose the
873: modifications done on the file, or stay in edition mode on it.
874: .Pp
875: The
1.35 jmc 876: .Ic unedit
877: command takes the following options:
878: .Bl -tag -width Ds -offset 3n
879: .It Fl l
880: Limit the scope of the search to the local directory
881: only and disable recursive behaviour.
882: .It Fl R
883: Enable recursive behaviour.
884: This is the default.
885: .El
1.11 jmc 886: .It Xo Ic update
1.38 xsa 887: .Op Fl AdflPpR
888: .Oo Fl D Ar date \*(Ba
889: .Fl r Ar rev Oc
890: .Op Fl I Ar ign
891: .Op Fl j Ar rev
892: .Op Fl k Ar mode
893: .Op Fl W Ar spec
1.4 jfb 894: .Op Ar file ...
1.3 jfb 895: .Xc
1.7 jfb 896: .Pp
1.3 jfb 897: The
1.11 jmc 898: .Ic update
1.17 david 899: command is used to merge any of the changes that have occurred on the remote
1.3 jfb 900: repository into the local one where the command was run.
901: .Pp
902: The
1.35 jmc 903: .Ic update
904: command takes the following options:
905: .Bl -tag -width Ds -offset 3n
906: .It Fl A
1.41 xsa 907: Reset any sticky tags, dates, or keyword substitution modes that
908: have been set on the tree.
1.38 xsa 909: .It Fl D Ar date
910: Update as of the latest revision no later than
911: .Ar date
912: (is sticky).
913: .It Fl d
914: Create any new directories.
915: Without this option,
916: .Nm
917: does not create any new files sitting in these new directories
918: added in the base repository since the last update of the working
919: copy, or since the last update with the
920: .Fl d
921: option.
922: .It Fl f
923: Force the use of the head revision if the specified
924: tag or date is not found.
925: .It Fl I Ar ign
926: Ignore files specified by
927: .Ar ign .
928: This option can be used several times on the command line.
929: To see all files, use the
930: .Fl I Ar !\&
931: specification.
932: .It Fl j Ar rev
933: Merge in changes made between current revision and
934: .Ar rev .
935: If two
936: .Fl j
937: options are specified, only merge the differences between the two
938: revisions of the branch.
939: This allows successive merges without having to resolve
940: already resolved conflicts again.
941: .It Fl k Ar mode
942: Specify the keyword substitution mode (is sticky).
1.35 jmc 943: .It Fl l
944: Limit the scope of the search to the local directory
945: only and disable recursive behaviour.
946: .It Fl P
947: Prune any directories that have become empty as a result of the update.
1.38 xsa 948: .It Fl p
949: Send the result of the update to standard output (avoids stickiness).
1.35 jmc 950: .It Fl R
951: Enable recursive behaviour.
952: This is the default.
1.38 xsa 953: .It Fl r Ar rev
954: Update from a particular revision or branch (is sticky).
955: .It Fl W Ar spec
956: Wrappers specification line.
1.35 jmc 957: .El
1.38 xsa 958: .Pp
959: By default, the
960: .Ic update
961: command does not create new directories; the
962: .Fl d
963: option must be used for that.
1.29 xsa 964: .Pp
965: For each file updated, a single letter prefix is given to
966: specify the state of the file.
967: The possible prefixes are as follows:
968: .Bl -tag -width "XXX"
969: .It \&?
970: The file is unknown to
971: .Nm .
972: .It A
973: The file has been added with the
974: .Ic add
975: command, but has not been committed to the repository with the
976: .Ic commit
977: command.
978: .It C
979: A merge, with a more recent version of the file, has been done,
980: but unresolved conflicts still remain.
981: .It M
982: The file has been locally modified; if a more recent version
983: is available, the merge has been done without conflict.
984: .It P
985: The same as
986: .Sq U ,
987: but, in client-server mode, only differences are sent to save network
988: resources.
989: .It R
990: The file has been removed with the
991: .Ic remove
992: command, but has not been committed to the repository with the
993: .Ic commit
994: command.
995: .It U
996: The file is up to date.
997: .El
1.13 jmc 998: .Pp
999: Aliases:
1000: .Ic up ,
1001: .Ic upd .
1.11 jmc 1002: .It Ic version
1.3 jfb 1003: Causes
1004: .Nm
1005: to print its version information.
1.14 jfb 1006: If this command is issued within a local copy of a remote repository or
1007: if either the
1008: .Ev CVSROOT
1009: environment variable or the
1010: .Fl d
1011: flag specify a remote repository,
1.3 jfb 1012: .Nm
1013: will also connect to the server and ask it to print its version information.
1.13 jmc 1014: .Pp
1015: Aliases:
1016: .Ic ve ,
1017: .Ic ver .
1.32 xsa 1018: .It Xo Ic watch
1019: .Ar on | off | add | remove
1020: .Op Fl lR
1021: .Op Fl a Ar action
1022: .Op Ar file ...
1023: .Xc
1024: .Pp
1025: The
1026: .Ic watch
1027: command switches a file from normal mode to
1028: pseudo-lock mode as well as handling the notifications associated
1029: with it.
1030: Pseudo-lock mode means knowing who is editing a file:
1031: for that,
1032: .Nm
1033: extracts the file in read-only mode.
1034: Users must use the
1035: .Ic edit
1036: command to get the editing rights on the file.
1037: .Pp
1038: One of the following arguments to the
1039: .Ic watch
1040: command is mandatory: on, off, add, or remove.
1041: .Ar on
1042: switches the file into pseudo-lock mode;
1043: .Ar off
1044: switches it back to normal mode;
1045: .Ar add
1046: adds notifications for specific actions on the file;
1047: .Ar remove
1048: removes those notifications.
1049: .Pp
1050: The notifications are permanent.
1051: They remain in place until the
1052: .Ic watch remove
1053: command is issued while the temporary notifications are
1054: made available with the
1055: .Ic edit
1056: command.
1057: .Pp
1058: The
1.35 jmc 1059: .Ic watch
1060: command takes the following options:
1061: .Bl -tag -width Ds -offset 3n
1062: .It Fl a Ar action
1063: Specify the permanent notification wanted for
1.32 xsa 1064: .Ar add | remove :
1065: .Pp
1066: .Bl -tag -width "commitXX" -compact
1067: .It Cm commit
1.35 jmc 1068: Another user has committed changes to the file.
1.32 xsa 1069: .It Cm edit
1.35 jmc 1070: Another user is editing the file.
1.32 xsa 1071: .It Cm unedit
1.35 jmc 1072: Another user has finished editing the file.
1.32 xsa 1073: .It Cm all
1074: All of the above.
1075: .It Cm none
1076: No notification.
1077: .El
1078: .Pp
1.35 jmc 1079: If no specification is requested using the
1.32 xsa 1080: .Ar add
1081: or
1082: .Ar remove
1083: arguments, it implies the
1084: .Fl a Ar all
1085: option.
1.35 jmc 1086: .It Fl l
1087: Limit the scope of the search to the local directory
1088: only and disable recursive behaviour.
1089: .It Fl R
1090: Enable recursive behaviour.
1091: This is the default.
1092: .El
1.32 xsa 1093: .It Xo Ic watchers
1094: .Op Fl lR
1095: .Op Ar file ...
1096: .Xc
1097: .Pp
1098: The
1099: .Ic watchers
1100: command lists the users who asked for notifications as well as the
1101: notifications details.
1102: The possible notifications are as follows:
1103: .Bl -tag -width "tcommitXX"
1104: .It Cm commit
1105: Permanent watch of a commit of a new version of a file.
1106: .It Cm edit
1107: Permanent watch of the start of file edition.
1108: .It Cm tcommit
1109: Temporary watch of a commit of new version of a file.
1110: .It Cm tedit
1111: Temporary watch of the start of file edition.
1112: .It Cm tunedit
1113: Temporary watch of the end of file edition.
1114: .It Cm unedit
1115: Permanent watch of the end of file edition.
1116: .El
1117: .Pp
1118: The temporary watches are set using the
1119: .Ic edit
1120: command, until the
1121: .Ic commit
1122: or
1123: .Ic unedit
1.35 jmc 1124: command is issued on a file.
1125: .Pp
1126: The
1127: .Ic watchers
1128: command takes the following options:
1129: .Bl -tag -width Ds -offset 3n
1130: .It Fl l
1131: Limit the scope of the search to the local directory
1132: only and disable recursive behaviour.
1133: .It Fl R
1134: Enable recursive behaviour.
1135: This is the default.
1136: .El
1.1 jfb 1137: .El
1138: .Sh ENVIRONMENT
1139: .Bl -tag -width CVS_CLIENT_LOG
1.8 jmc 1140: .It Ev CVS_CLIENT_LOG
1141: This variable enables logging of all communications between the client and
1142: server when running in non-local mode.
1143: If set, this environment variable must contain a base path from which two
1144: paths will be generated by appending ".in" to the value for the server's
1145: input and ".out" for the server's output.
1.1 jfb 1146: .It Ev CVS_RSH
1147: Name of the program to use when connecting to the server through a remote
1148: shell.
1149: The default is to use the
1150: .Xr ssh 1
1151: program.
1152: .It Ev CVS_SERVER
1153: If set, gives the name of the program to invoke as a
1154: .Nm
1155: server when using remote shell.
1156: The default is to use `cvs'.
1157: .It Ev CVSEDITOR
1158: Name of the editor to use when editing commit messages.
1.8 jmc 1159: Checked before
1160: .Ev EDITOR
1161: and
1162: .Ev VISUAL .
1163: .It Ev CVSROOT
1164: When set, this variable should contain the string pointing to the root
1165: directory of the CVS repository.
1166: The contents of this variable are ignored when the
1167: .Fl d
1168: option is given or if `Root' files exist in the checked-out copy.
1.1 jfb 1169: .It Ev EDITOR
1.9 jmc 1170: Name of the editor to use when editing commit messages.
1171: This is traditionally a line-oriented editor,
1172: such as
1173: .Xr ex 1 .
1.1 jfb 1174: .It Ev VISUAL
1.9 jmc 1175: Name of the editor to use when editing commit messages.
1176: This is traditionally a screen-oriented editor,
1177: such as
1178: .Xr vi 1 .
1.8 jmc 1179: .El
1180: .Sh FILES
1181: .Bl -tag -width Ds
1182: .It Pa $HOME/.cvsrc
1183: File containing a list of implicit options to pass to certain commands.
1184: This file is read on startup unless the
1185: .Fl f
1186: option is specified.
1187: .It Pa $CVSROOT/CVSROOT
1188: Directory containing repository administrative files.
1189: .It Pa $CVSROOT/CVSROOT/loginfo
1190: File containing associations between modules and handlers for
1191: post-commit logging.
1.1 jfb 1192: .El
1193: .Sh SEE ALSO
1194: .Xr diff 1 ,
1.15 jmc 1195: .Xr gzip 1 ,
1.1 jfb 1196: .Xr patch 1 ,
1.8 jmc 1197: .Xr rcs 1 ,
1.16 jmc 1198: .Xr cvsrc 5 ,
1.35 jmc 1199: .Xr cvsintro 7 ,
1.1 jfb 1200: .Xr cvsd 8
1.8 jmc 1201: .Sh HISTORY
1202: The OpenCVS project is a BSD-licensed rewrite of the original
1203: Concurrent Versioning System written by Jean-Francois Brousseau.
1204: The original CVS code was written in large parts by Dick Grune,
1205: Brian Berliner and Jeff Polk.
1206: .Sh AUTHORS
1207: .An Jean-Francois Brousseau
1208: .An Vincent Labrecque
1209: .An Joris Vink
1.43 jfb 1210: .An Xavier Santolaria
1.2 jfb 1211: .Sh CAVEATS
1212: This CVS implementation does not fully conform to the GNU CVS version.
1.3 jfb 1213: In some cases, this was done explicitly because GNU CVS has inconsistencies
1.2 jfb 1214: or ambiguous behaviour.
1.3 jfb 1215: Some things have also been left out or modified to enhance the overall
1216: security of the system.
1217: .Pp
1218: Among other things, support for the pserver connection mechanism has been
1219: dropped because of security issues with the authentication mechanism.