Mapping CVS Paths

CVS paths are mapped into Perforce using the original RCS file structure, but prefixed with the branch name. The converter uses a branch name 'main' for the initial 1.1 branch and the symbol names for subsequent branches.

If requires an optional path map can be provided to remap the CVS path to a new structure within Perforce. When designing a path map, care must be taken to insure that all CVS paths have a destination mapping.

  1. To enable CVS path mapping create a file called path.map with regex and group match.

  2. Only the first matching entry is used.

  3. The regex and group match are seperated by ', ' (or in regex terms ',\s+').

  4. Lines starting with '#' are ignored.

For example, 'trunk' is renamed to 'main', but other entries are left as-is.

# path.map
trunk/(.*), //import/main/{1}
(.*), //import/{1}

Note: if no file is found the default 'depot' and 'subPath' options are used to generate the map, preserving the original behaviour. CVS paths will always stat with the 'branch' name. 'main' for 1.1 and the symbol for other branches.

# path.map
main/projA/(.*), //import/projA/MAIN/{1}
release_(.*)/projA/(.*), //import/projA/REL{1}/{2}
(.*)/projA/(.*), //import/projA/TAG-{1}/{2}
(.*), //import/unexpected/{1}

Note

Adding a catch all is a good idea (as shown in the last line with the 'unexpected' directory).