xref: /openbsd/usr.bin/cvs/cvs.5 (revision d89ec533)
1.\"	$OpenBSD: cvs.5,v 1.9 2013/06/29 09:08:41 jmc Exp $
2.\"
3.\" Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
4.\" Copyright (c) 2004-2008 Xavier Santolaria <xsa@openbsd.org>
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 $Mdocdate: June 29 2013 $
28.Dt CVS 5
29.Os
30.Sh NAME
31.Nm cvs
32.Nd OpenCVS files format
33.Sh DESCRIPTION
34This manual page documents the various support files for
35.Xr cvs 1
36and the format of those files.
37.Pp
38The location of a module's files are known as its
39.Dv CVSROOT .
40The files within CVSROOT are as follows:
41.Bl -tag -width Ds
42.It Pa $CVSROOT/CVSROOT
43Directory containing repository administrative files.
44.It Pa $CVSROOT/CVSROOT/config
45File containing various configuration options.
46The format of each line is as follows:
47.Pp
48.Dl keyword=value
49.Pp
50Extraneous spaces or tabs are not permitted.
51A line beginning with a hash character
52.Pq Sq #
53is considered a comment and ignored.
54.Pp
55The following options are available:
56.Pp
57.Bl -tag -width "dlimit=XvalueXXX" -offset indent -compact
58.It dlimit='value'
59Set the process data size limit.
60.It tag='value'
61Set the name of a local tag to use in addition to Id.
62.It umask='value'
63Set the default umask to use when creating files and directories.
64.El
65.It Pa $CVSROOT/CVSROOT/history
66File containing reports of
67.Ic checkout ,
68.Ic commit ,
69.Ic export ,
70.Ic release ,
71.Ic rtag ,
72and
73.Ic update
74commands that have been issued.
75By default, the
76.Ic init
77command creates the
78.Pa history
79file.
80To disable history logging, the
81.Pa history
82file should be removed manually.
83The
84.Ic history
85command shows these reports according to several criteria.
86.It Pa $CVSROOT/CVSROOT/loginfo
87File containing associations between modules and handlers for
88post-commit logging.
89.It Pa $CVSROOT/CVSROOT/modules
90The format of each line is as follows:
91.Pp
92.Dl module [option] directory [file ...] [&module ...]
93.Pp
94Empty lines are ignored.
95A line beginning with a hash character
96.Pq Sq #
97is considered a comment and ignored.
98A long line can be continued on the next line by specifying a backslash
99.Pq Sq \e
100character as last character.
101.Pp
102The following options are available:
103.Bl -tag -width Ds -offset 3n
104.It Fl d Ar name
105Allow check out of module under different
106.Ar name .
107.It Fl i Ar prog
108Specify program
109.Ar prog
110to run whenever the
111.Ic commit
112command is issued.
113.It Fl o Ar prog
114Specify program
115.Ar prog
116to run whenever the
117.Ic checkout
118command is issued.
119.It Fl s Ar status
120Set
121.Ar status
122to module.
123.It Fl t Ar prog
124Specify program
125.Ar prog
126to run whenever the
127.Ic rtag
128command is issued.
129.It Fl u Ar prog
130Specify program
131.Ar prog
132to run whenever the
133.Ic update
134command is issued.
135.El
136.El
137.Pp
138Each directory that is managed by
139.Nm
140contains a
141.Pa CVS
142directory.
143This directory is used by various
144.Nm
145commands to record the status of files in the current working directory.
146These files should not be modified manually by the user but by the
147.Nm
148commands instead.
149Files that are always stored in every
150.Pa CVS
151directory are as follows:
152.Bl -tag -width Ds
153.It Pa CVS/Entries
154File containing a list of files managed by
155.Nm .
156.Pa Entries
157has one line per file or directory describing the state of it with
158regard to the source repository.
159These lines have the following format:
160.Pp
161.Dl /name/revision/timestamp/options/tag
162.Bl -tag -width Ds
163.It name
164Name of the file in the directory.
165.It revision
166Revision of the file in the working directory.
167The revision is equal to
168.Sq 0
169if the file has been added with the
170.Ic add
171command or preceded by the
172.Sq -
173character if the file has been removed with the
174.Ic remove
175command.
176.It timestamp
177Contains the timestamp of the file at the time
178.Nm
179created it.
180If the timestamp is different from the actual modification time of the file,
181it means that the file has been modified.
182.It options
183Contains the keyword substitution mode used for this file.
184.It tag
185Contains
186.Sq T
187followed by a tagname or
188.Sq D
189followed by a date.
190.El
191.Pp
192Entries corresponding to directories have the following format:
193.Pp
194.Dl D/name////
195.Pp
196The lines in the
197.Pa Entries
198file can be in any order.
199.It Pa CVS/Repository
200File containing the path to the corresponding directory in the
201source repository.
202.It Pa CVS/Root
203File containing the value of the
204.Ev CVSROOT
205variable at the time of checkout.
206This file is used by all
207.Nm
208commands instead of
209.Ev CVSROOT
210once
211.Nm
212has checked for its existence.
213.El
214.Pp
215Depending on the circumstances, other files may exist in the
216.Pa CVS
217directory:
218.Bl -tag -width Ds
219.It Pa CVS/Base
220If pseudo-lock mode is enabled in client-server mode,
221the
222.Pa Base
223directory contains a copy of the file on which the
224.Ic edit
225command has been issued.
226This allows the
227.Ic unedit
228command to operate even if the CVS server is unreachable.
229.It Pa CVS/Baserev
230File listing the revisions for each file contained in the
231.Pa Base
232directory under the following format:
233.Pp
234.Dl name/revision/
235.It Pa CVS/Baserev.tmp
236Temporary file used to write
237.Pa CVS/Baserev
238content then atomically renamed to
239.Pa Baserev .
240.It Pa CVS/Checkin.prog
241File containing the path to the command specified with the
242.Fl i
243option in the
244.Pa CVSROOT/modules
245file.
246.It Pa CVS/Entries.Backup
247Temporary file used to write
248.Pa CVS/Entries
249content then atomically renamed to
250.Pa Entries .
251.It Pa CVS/Entries.Static
252Tells
253.Nm
254to not add files to the directory unless the
255.Ic update
256command is issued with the
257.Fl d
258option.
259.It Pa CVS/Notify
260File containing the notifications that could not be sent to the
261CVS server but will be sent at the next successful connection.
262.It Pa CVS/Notify.tmp
263Temporary file used to write
264.Pa CVS/Notify
265content then atomically renamed to
266.Pa Notify .
267.It Pa CVS/Tag
268File containing the symbolic revision that was used at checkout.
269The first character of the line is a single letter indicating the
270type of tag:
271.Sq D ,
272.Sq N ,
273or
274.Sq T ,
275for date, non-branch tag, or branch tag, respectively.
276The rest of the line is the tag or date itself.
277The
278.Pa Tag
279file should not be removed manually:
280instead, use
281.Dq update -A .
282.It Pa CVS/Template
283File containing the template specified by the
284.Pa CVSROOT/rcsinfo
285file.
286It is only used in client-server mode.
287Locally,
288.Nm
289uses the
290.Pa rcsinfo
291file directly.
292.It Pa CVS/Update.prog
293File containing the path to the command specified with the
294.Fl u
295option in the
296.Pa CVSROOT/modules
297file.
298.It Pa CVS/<name>,t
299File containing the description of the file
300.Pa file
301that has been added with the
302.Ic add
303command.
304This description is used by
305.Nm
306when archiving this file with the
307.Ic commit
308command.
309.It Pa $HOME/.cvsignore
310This file provides a list of files (or
311.Xr sh 1
312file name patterns) that should be ignored by
313.Xr cvs 1
314during the
315.Ic import ,
316.Ic release ,
317and
318.Ic update
319commands.
320.Pp
321The syntax of the
322.Nm
323file consists of a series of lines, each of which contains a
324space-separated list of filenames.
325There is currently no way of using comments in this file.
326.Pp
327Default patterns that are ignored by
328.Xr cvs 1
329are as follows:
330.Bd -filled
331CVS,
332RCS,
333RCSLOG,
334SCCS,
335TAGS,
336tags,
337core,
338cvslog*,
339*.o,
340*.so,
341*.a,
342*.bak,
343*.orig,
344*.rej,
345*.old,
346*.exe,
347*.depend,
348*.obj,
349*.elc,
350*.ln,
351*.olb,
352*.core,
353\&.#*,
354*~,
355_$*,
356*$,
357#*,
358,*.
359.Ed
360.Pp
361The list can be modified using the methods described below:
362.Pp
363.Bl -enum -compact
364.It
365The
366.Pa $CVSROOT/CVSROOT/cvsignore
367file appends patterns to ignore for the whole repository.
368.It
369The
370.Pa $HOME/.cvsignore
371file appends patterns to ignore for user only.
372.It
373The content of the
374.Ev CVSIGNORE
375variable is appended to the list.
376.It
377Options to the command line
378.Fl I
379flag, available for the
380.Ic import
381and
382.Ic update
383commands, appends patterns for the current command line action only.
384.It
385.Pa .cvsignore
386files placed in the repository directories allow to add patterns to
387ignore locally.
388They do not take effect on sub-directories.
389.El
390.Pp
391The
392.Sq !\&
393character can be used to reset the list of patterns using any of these
394five methods.
395.Pp
396For the
397.Ic update
398command,
399.Xr cvs 1
400handles files that are already present in the repository even if they
401are in the list to ignore.
402Files that are in the list to ignore but not in the repository will not
403be listed.
404This way, files preceded by the
405.Sq ?\&
406character will not appear even if they should.
407.It Pa $HOME/.cvsrc
408This file provides a way to give the
409.Xr cvs 1
410program implicit global options and command-specific options.
411Unless the
412.Fl f
413option is specified,
414.Xr cvs 1
415reads its startup configuration file
416.Pa .cvsrc
417from the home directory of the user who invoked it.
418.Pp
419The format of each line is as follows:
420.Pp
421.Dl command [arg ...]
422.Pp
423where
424.Ar command
425is either the
426.Sq cvs
427keyword to specify global options, one of the supported
428.Xr cvs 1
429commands or a command alias.
430Arguments following
431.Ar command
432will be added implicitly to the appropriate command's argument vector if it is
433run.
434Lines whose
435.Ar command
436argument is not a valid command will generate a warning when running with
437the
438.Fl V
439flag.
440.Pp
441Empty lines are ignored.
442A line beginning with a hash character
443.Pq Sq #
444is considered a comment and ignored.
445.Pp
446For example, to specify that
447.Xr cvs 1
448should always run in quiet mode and the
449.Ic diff
450internal command should always produce unified output:
451.Bd -literal -offset indent
452cvs -q
453diff -u
454.Ed
455.It Pa $HOME/.cvswrappers
456This file, located in
457.Pa $CVSROOT/CVSROOT
458and/or
459.Pa $HOME/.cvswrappers ,
460provides a way to configure filters for
461.Xr cvs 1
462based on file type (name).
463This works by specifying a pattern to match for varying file types.
464.Pp
465The format of each line is as follows:
466.Pp
467.Dl pattern [option 'value'] [option 'value'] ...
468.Pp
469The following options are supported:
470.Bl -tag -width Ds
471.It Fl f Ar filter
472Execute
473.Ar filter
474when the file is extracted from the repository (for the
475.Ic checkout ,
476.Ic export ,
477and
478.Ic update
479commands).
480.It Fl k Ar mode
481Specify the keyword substitution mode.
482See the KEYWORD SUBSTITUTION section of
483.Xr rcs 1
484for more information.
485.It Fl m Ar method
486Specify the merge methodology to be used when a file is updated.
487.Pp
488The methods are as follows:
489.Bl -tag -width Ds
490.It COPY
491When the
492.Ic update
493command is used,
494.Xr cvs 1
495will merely copy one version over another and let the user do the merge
496by himself.
497This method is used by default on binary files (see the
498.Fl k Ar b
499option).
500.It MERGE
501Try to merge the files.
502This method is the default.
503.El
504.It Fl t Ar filter
505Execute
506.Ar filter
507before the file is archived in the repository (for the
508.Ic commit ,
509and
510.Ic import
511commands).
512.El
513.It Pa $TMPDIR/cvs-serv Ns Aq Pa pid
514Temporary directory created by the server where
515.Ar pid
516is the process ID of the server.
517It is located in the directory specified by the
518.Ev TMPDIR
519environment variable or the
520.Fl T
521global option.
522See above for more information.
523.El
524.Sh SEE ALSO
525.Xr cvs 1 ,
526.Xr cvsintro 7
527