You can override the substitution mode by using the -k option to cvs add, -k or -A options to cvs checkout or cvs update. cvs diff also has a -k option. For some examples, see Chapter 10, Handling binary files, and the section called “Merging and keywords”.
The cvs update and cvs checkout commands allow you to modify existing substitution modes without overwriting the existing ones. This is done by prefixing the mode with '+' (for add) or '-' (for remove). For example to switch off keyword substitution for all files in a subtree:
$ cvs update -k+o $ cvs commit -fm "Change substitution mode"
The modes available are defined by combining an optional encoding with a series of options.
Some combinations were not available on older CVS versions so be careful if you want to access your repository from older clients. The CVSNT server will automatically downgrade some of these options if an older client fetches a file.
Treat the file as a text file. This is the default setting if no encoding is specified.
MBCS character sets that don't change the behaviour of CR/LF and NULL should also work in this mode. eg. Shift-JIS and EUC.
Treat the file as binary. No interpretation is done of the contents and they are stored verbatim. Be default no keyword expansion is done. Binary files are considered non-mergable by CVS.
Treat the file as binary. No interpretation is done of the contents and they are stored verbatim. Be default no keyword expansion is done. Binary files are considered non-mergable by CVS. In addition, an alternate storage algorithm is used that is optimised for storage of binary files.
Treat the file as Unicode. The file will be checked in/out in UCS-2 (or UTF-16) encoding and internally stored as UTF-8 by the server.
Use an extended encoding. Any encoding supported by the client-side iconv library can be used, however beware of mismatches between clients (the Win32 version does not currently support EBCIDIC encodings for example). The following list will work on all platforms that are using Unicode-capable CVSNT:
Little-endian UCS-2 without BOM.
Big-endian UCS-2 without BOM.
Little-endian UCS-2 with BOM.
Big-endian UCS-2 with BOM.
Enforce cooperative edits (edit -c) for the file.
Enforce reserved edit (edit -x) for the file.
Preserve the keyword string (default). When combined with the v flag this generates results using the default form, e.g. $Revision$ for the Revision keyword. On its own it produces output with no keywords expanded.
Generate keyword values for keyword strings. Normally paired with the k option. If it is used on its own the effect is to strip keywords from the output - for example, for the Revision keyword, generate the string 5.7 instead of $Revision: 126.96.36.199$. This can help generate files in programming languages where it is hard to strip keyword delimiters like $Revision$ from a string. However, further keyword substitution cannot be performed once the keyword names are removed, so this option should be used with care.
Insert the lockers name if the given revision is currently locked. The locker's name is only relevant if cvs admin -l is in use.
File is never considered modified on the client. A normal commit will never commit this file, unless -f is used to force it. Use with care, and for files that change infrequently, since local changes will be lost on update.
Unversioned. Only ever keep a single revision in the repository. History is lost, and the file is merely kept as the latest copy. Only one branch (HEAD) ever exists and an update of any revision will return the single revision.
When checking out, always create a file with Unix line endings (LF).
Whcn checking out, always create a file with Dos/Windows line endings (CR/LF).
When checking out, always create a file with Mac line endings (CR)
Generate the old keyword string, present in the working file just before it was checked in. For example, for the Revision keyword, generate the string $Revision: 188.8.131.52;$ instead of $Revision$ if that is how the string appeared when the file was checked in.
Compress the files and deltas when they are stored. This sacrifices speed for disk space - only use if disk space is at a premium.