Chapter 5. SCM Frontends

5.1. CVS

CVS is the Concurrent Versions System, the dominant open-source network-transparent version control system.

Scmbug supports verification checks, integration of log messages with the bug-tracking system, and integration of labeling operations for CVS. Various deficiencies of CVS introduce complications in integration. It is recommended that users of CVS upgrade to Subversion.

CVS does not require users to enter a log comment when directories are added in a repository. Scmbug does not overcome this limitation, even though it is possible to do so.

Another limitation of CVS is that it does not provide an integration hook on 'cvs admin -o'.

The verification hook of CVS 1.11.x does not provide the list of files that will be modified. As a result, the Valid product name policy cannot be set to auto for CVS 1.11.x. This policy will be implemented in the future for CVS 1.12.x and, if possible, for CVSNT.

The temporary log message file of CVS 1.11.x reports the directory in which a change is applied. However it does not report separately the repository path. As a result, the Mail on success policy reports the changeset directory only. This will be implemented in the future for CVS 1.12.x and CVSNT.

A major drawback of CVS is it's lack of atomic transactions. As a side-effect, when the same log message is used to commit files in two separate directories, two integration activities are issued using the same log message. Duplicate log messages are then entered in the bug-tracking system. Scmbug solves this problem by using the commitinfo and loginfo hooks to detect commits in separate directories and consolidate the log messages entered in the bug-tracking system as one log message (one integration activity). This behavior is optional and can be configured in the glue configuration file using the consolidate_cvs_messages variable, as shown in Figure 5-1.

Figure 5-1. Configuration option that consolidates CVS messages.

# This applies only to CVS. When a commit affects more than
# one directory, multiple duplicate log comments are inserted,
# one-per-directory. Enabling this option would consolidate
# the commits to all use the first log message.
consolidate_cvs_messages => 1
      
It is possible to introduce logic in the Scmbug daemon that can solve this problem.

A common limitation of other systems integrating CVS with bug-tracking resulted from the inadequate mechanism CVS 1.11.x uses to provide the list of affected files in a commit trigger. For each file, the old version, new version, and the filename, all separated by commas, can be passed as command-line arguments to an integration trigger script. When the filenames, or the directory in which the files reside, contain either commas or whitespaces, a processing script using a single regular expression to parse these arguments will get confused. Some systems addressed this by requiring source modifications to the CVS binary, and distributed patches for it. Scmbug addresses this issue by employing a stateful parser. Using this parser, the probability of files and directories with whitespaces or commas contained in their names to confuse the integration glue is marginal. For example, the filename shown in Figure 5-2 is accepted.

Figure 5-2. A complex filename accepted by the CVS glue.

a file with spaces,NONEs, commas, digits,1.1,2.numbers close to dots.1.2,NONe.txt
      

The verification hook hook for CVS does not provide the list of filenames that will be commited, hence it is impossible to dynamically detect the product name. Automatically detected product names are not supported for CVS.

Scmbug has been verified to work against the following releases of CVS:

Somewhere during the 1.12.x series of CVS (e.g. 1.12.9) the command line template format changed. This newer format is also supported by Scmbug.