Setting the CVS keyword substitution mode

CVS uses the keyword substitution mode of a file to differentiate binary files from ASCII files and to indicate what type of keyword substitution is to take place when files are committed and checked out.

To set the CVS keyword substitution mode:

  1. In the Navigator view, select the files or containing folders for which a change in keyword substitution mode is desired. Note: Ensure that any new files that are to be committed are added to CVS version control as the keyword substitution mode can only be set for files that are already under CVS control.
  2. From the pop-up menu, select Team > Change ASCII/Binary Property. The Set Keyword Substitution Mode wizard will open.
  3. On the first page of the wizard, select the mode to be applied to the selected files:

    • Automatic - uses the file type to determine whether selected resources should use binary or the default ASCII mode (the default ASCII mode is set on the Team > CVS preference page).
    • Binary - sets all selected files to binary. Files that are binary are not altered in any way by CVS.
    • ASCII without keyword substitution - sets all the selected files to ASCII but CVS does not perform any keyword substitution. The line endings of ASCII files may be altered by CVS to align with a platform's line-terminator convention.
    • ASCII with keyword substitution - sets all the selected files to ASCII and CVS will perform the selected type of keyword substitution.

    Click Next to go to the next page.

  4. On the Include versioned files page of the wizard, indicate whether files already shared in the repository are to be affected. If this setting is disabled, only files that have been added to CVS control but not committed will be affected. This page will only appear if there are files already shared with the repository. Click Next to go to the next page.
  5. On the Include files with outgoing changes page of the wizard, indicate whether files that have outgoing changes are to be affected. This page will only appear if there are files with outgoing changes. Click Next to go to the next page.
  6. On the Enter Commit Comment page of the wizard, enter the commit comment to be associated with any file commits. Files will need to be committed if changing the file type from Binary to ASCII results in a change in the file content due to line terminator adjustments. Click Next to go to the next page.
  7. On the Summary page of the wizard, inspect the proposed keyword substitution mode settings to ensure they are correct. Click Finish to apply the changes.

Tip: On the Summary page, the assigned mode for a file can be changed by clicking on the proposed mode in the table and selecting the desired mode from the drop down list that becomes available.

Related concepts
Team programming with CVS
Branches
Synchronizing with a CVS repository

Related tasks
Creating a CVS repository location
Checking out a project from the CVS repository
Replacing resources in the Workbench
Branching
Synchronizing with the repository
Updating
Resolving conflicts
Merging from a branch

Related reference
CVS
File Content