SetupSystem Requirements
[SVN] an unzipped Subversion dump file of the repository to be converted
(generated without the --delta flag).
[CVS] an unzipped CVSROOT directory containing the RCS files of the
repository to be converted.
System must have Java SE Runtime 1.7.
System must have the Perforce Server binaries 2010.2 or greater.
[Import Mode] A running Perforce Server (typically empty) with no
pending changes in the conversion area.
[Convert Mode] An empty Perforce Root directory for the generated
archive and journal files.
Resource Tips:
Running some conversions, particularly in Conversion Mode can
be very memory intensive, as we keep a mapping of revisions and
integrations in memory. For large conversions or conversions with
excessive branching, more memory will needed by the JVM.
The --info option will scan the Subversion dump
file and report usage data to help estimate the required memory for
Convert Mode. For example:
java -jar p4convert.jar --info <path_to_svn_dumpfile>
Use the -Xmx flags to increase the memory
allocated to the JVM. For example, to allocate 64GB (65536MB) use:
java -Xmx65536M -jar p4convert.jar myConfig.cfg
Caveats
The following table lists the combinations of tested operating systems
and Perforce Server versions.
Operating System10.213.1Ubuntu 10.04supportedsupportedDarwin 11.4.0supportedsupportedWindows 7x64supportedsupportedSunOS 5.10supportedsupported
It is likely that other combinations will work, however it is not
possible to test all combinations.
Please contact Perforce if you have any OS or version queries.
[Import Mode] Symbolic links are not supported in Import Mode on
Windows.
Perforce keyword expansions are different from the CVS and
Subversion standard and may yield different results when synced.
Setup and Usage
Download the self-contained JAR from Perforce and check that Java SE
runtime is installed with version 1.7 or greater.
For usage details, execute the jar with no options:
java -jar p4convert.jar
No option or configuration file specified...
Usage:
java -jar p4convert.jar [ config file ]
Options:
java -jar p4convert.jar --config [ SVN | CVS ]
java -jar p4convert.jar --version
Subversion specific options:
java -jar p4convert.jar --info [ dumpfile ]
java -jar p4convert.jar --users [ dumpfile ]
java -jar p4convert.jar --extract [ rev ].[ node ] [ dumpfile ]
Create a configuration file using the --config
option. This will contain a set of default configuration options
based on you platform. To start a conversion, execute the jar with
the populated configuration file. For example:
java -jar p4convert.jar my_CVSrepo.cfg
Generating a Subversion Dump file
For Subversion conversions, both Import and Convert modes require a
Subversion dumpfile as the history data source. A dumpfile can be
generated in several different ways; two of which are detailed below:
Using the svnadmin command:
svnadmin dump local_repo_path > dumpfile.dmp
Replace local_repo_path with the path to
the Subversion repo. Do not use the --delta
flag option as the results cannot be parsed by the conversion tool.
Using the remote dump command:
rsvndump url > dumpfile.dmp
Replacing url with the remote Subversion
server. For example: http:// or
file:// or svn://. Note that
for large servers generating the dump file locally is significantly
faster, you might also consider creating a local copy of the
subversion depot using
svnsync,
before generating the dump file.
Selecting a CVS root
For CVS conversions, both Import and Convert modes require a path
containining RCS files as the history data source. CVSROOT can be filtered
or imported on a per module basis. The converter will only import file
revisions under the specified CVSROOT path.