- 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>>>

B.2 The cvswrappers file

The ‘CVSROOT/cvswrappers’ file lets you set per-file options based on the name of the file which is being operated on. The settings are ‘-k’ for binary files, and ‘-m’ for nonmergeable text files.

The basic format of the ‘cvswrappers’ file is:

wildcard     [option value][option value]...

where option is one of:

update methodology, value: MERGE or COPY
keyword expansion, value: expansion mode

and each value is single-quote delimited.

The ‘-m’ option specifies the merge methodology that should be used when a non-binary file is updated. MERGE means the usual CVS behavior: try to merge the files. COPY means that cvs update will refuse to merge files, as it also does for files specified as binary with ‘-kb’ (but if the file is specified as binary, there is no need to specify ‘-m 'COPY'’). CVS will provide the user with the two versions of the files, and require the user using mechanisms outside CVS, to insert any necessary changes.

@BF{WARNING: do not use COPY with CVS 1.9 or earlier--such versions of CVS will copy one version of your file over the other, wiping out the previous contents.} The ‘-m’ wrapper option only affects behavior when merging is done on update; it does not affect how files are stored. See section 9 Handling binary files, for more on binary files.

The ‘-k’ option can be used to set the ‘b’ flag for binary files, as on the command line. For example, the following ‘cvswrappers’ file will import files whose name ends in ‘.exe’ as binary:

# cvswrappers: handle .exe files as binary
*.exe -k 'b'

In addition to the repository-wide ‘cvswrappers’ file in the ‘CVSROOT’ directory, individual users can also specify their own settings in a ‘~/.cvswrappers’ file.

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