Change 11071

paul_allen (Paul Allen)
Paul Allen committed this change into //guest/perforce_software/p4convert
Request Review
Download .zip
Path map translator for CVS and SVN paths.

(undoc)
To use create a path.map file with regex and group match.  Only the first matching entry is used.  The regex and group match are seperated by ', ' (or in regex terms ',\s+').  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}

Node: adding a catch all is a good idea.
  • Files 17
  • Comments 0
14 edited 3 added 0 deleted
src/com/perforce/common/asset/AssetWriter.java#4
Loading...
src/com/perforce/common/depot/DepotConvert.java#3
Loading...
src/com/perforce/common/depot/DepotImport.java#2
Loading...
src/com/perforce/common/depot/DepotInterface.java#2
Loading...
src/com/perforce/common/journal/BuildChange.java#2
Loading...
src/com/perforce/common/journal/BuildLabel.java#4
Loading...
src/com/perforce/common/node/PathMapEntry.java#1
Loading...
src/com/perforce/common/node/PathMapTranslator.java#1
Loading...
src/com/perforce/common/process/ProcessChange.java#4
Loading...
src/com/perforce/svn/change/ChangeImport.java#7
Loading...
src/com/perforce/svn/query/QueryPerforce.java#2
Loading...
test/com/perforce/common/TestPathMap.java#1
Loading...
test/com/perforce/cvs/integration/CvsImportTests.java#32
Loading...
test/com/perforce/cvs/integration/CvsIntegrationTests.java#33
Loading...
test/com/perforce/integration/ImportTests.java#11
Loading...
test/com/perforce/integration/IntegrationTests.java#10
Loading...
test/com/perforce/svndump/prescan/TestUsage.java#2
Loading...
Tip: Use n and p to cycle through the changes.