Next: , Previous: modules, Up: Administrative files



C.2 The cvswrappers file

Wrappers refers to a cvs feature which lets you control certain settings 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 -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.

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 Binary files, for more on binary files.

The basic format of the file cvswrappers is:

     wildcard     [option value][option value]...
     
     where option is one of
     -m           update methodology      value: MERGE or COPY
     -k           keyword expansion       value: expansion mode
     
     and value is a single-quote delimited value.

For example, the following command imports a directory, treating files whose name ends in .exe as binary:

     cvs import -I ! -W "*.exe -k 'b'" first-dir vendortag reltag