- publishing free software manuals
Version Management with CVS - the CVS manual
by Per Cederqvist et al.
Paperback (6"x9"), 216 pages, 8 figures
ISBN 0954161718
RRP £19.95 ($29.95)

Get a printed copy>>>

17.9 The CVS directory in the repository

The ‘CVS’ directory in each repository directory contains information such as file attributes in a file called ‘CVS/fileattr’. In the future other files may be added to this directory, so implementations should silently ignore additional files.

This behavior is implemented only by CVS 1.7 and later; for details see section 10.6.5 Using watches with old versions of CVS.

The format of the ‘fileattr’ file is a series of entries of the following form (where ‘{’ and ‘}’ means the text between the braces can be repeated zero or more times):

ent-type filename <tab> attrname = attrval {; attrname = attrval} <linefeed>

ent-type is ‘F’ for a file, in which case the entry specifies the attributes for that file.

ent-type is ‘D’, and filename empty, to specify default attributes to be used for newly added files.

Other ent-type are reserved for future expansion. CVS 1.9 and older will delete them any time it writes file attributes. CVS 1.10 and later will preserve them.

Note that the order of the lines is not significant; a program writing the ‘fileattr’ file may rearrange them at its convenience.

There is currently no way of quoting tabs or line feeds in the filename, ‘=’ in attrname, ‘;’ in attrval, etc. Note: some implementations also don't handle a NUL character in any of the fields, but implementations are encouraged to allow it.

By convention, attrname starting with ‘_’ is for an attribute given special meaning by CVS; other attrnames are for user-defined attributes (or will be, once implementations start supporting user-defined attributes).

Built-in attributes:

Present means the file is watched and should be checked out read-only.
Users with watches for this file. Value is watcher > type { , watcher > type } where watcher is a username, and type is zero or more of edit,unedit,commit separated by ‘+’ (that is, nothing if none; there is no "none" or "all" keyword).
Users editing this file. Value is editor > val { , editor > val } where editor is a username, and val is time+hostname+pathname, where time is when the cvs edit command (or equivalent) happened, and hostname and pathname are for the working directory.


Ffile1 _watched=;_watchers=joe>edit,mary>commit
Ffile2 _watched=;_editors=sue>8 Jan 2007+gnu+/home/sue
D _watched=

means that the file ‘file1’ should be checked out read-only. Furthermore, joe is watching for edits and mary is watching for commits. The file ‘file2’ should be checked out read-only; sue started editing it on 8 Jan 2007 in the directory ‘/home/sue’ on the machine gnu. Future files which are added should be checked out read-only. To represent this example here, we have shown a space after ‘D’, ‘Ffile1’, and ‘Ffile2’, but in fact there must be a single tab character there and no spaces.

ISBN 0954161718Version Management with CVS - the CVS manualSee the print edition