Advanced Configuration

Directory Properties

The following options allow Subversion Directory Properties to be stored as versioned files in Perforce. To enable this mode set the following property to true:

com.p4convert.svn.propEnabled=true

To select the property name and format: (Note: only ini mode is supported)

com.p4convert.svn.propEncoding=ini
com.p4convert.svn.propName=.svn.properties

Empty changelists

The following property will attempt to skip empty changes (where the change contains no revisions). This is typically the default behavior of the client or Import Mode, so it is only really used in Convert Mode.

com.p4convert.p4.skipEmpty=false

Username translation

A username map file (users.map) can be generated using the --users option and then the right-hand-side modified with the new user name. The rename will only occur if the conversion tool finds the users.map file in the current working directory. Username mapping is not currently supported for CVS conversions.

Binary file detection

Binary files can be identified by adding their extensions to the type map file types.map. The format is based on Perforce typemap spec, however it is limited to paths of the form //....ext (where .ext is the binary extension).

Default Type map (types.map):

TypeMap:
        binary	//....zip
        binary	//....gif
        binary	//....png
        binary	//....jpg
        binary  //....dll
        binary  //....class
        binary  //....jar
        binary  //....ecsfr

Modification bits (+mxwlk) are supported and can be added using the type mapping. Binary detection though the type map is recommended as conversion is much faster. Binary files not identified in the type map will be scanned by the ICU4J libraries and if no text/Unicode match is found they are assumed to be binary.

Warning

ICU4J may incorrectly identify small binary files as text creating sync issues on Windows clients.

Changelist Description Format

The logRevID option can be used to reformat the Subversion revision descriptions to include the revision ID using the template:

  • <rev> substituted with the Subversion revision

  • <description> substituted with the Subversion log

The default value (as-is):

com.p4convert.p4.logRevID=<description>

Case Sensitivity

The platform case sensitivity is detected when generating the configuration file. There is normally no reason to change this behavior from the detected defaults. Conversions between different platforms should be avoided especially when converting from a case sensitive environment (such as Linux) to a case insensitive environment (such as Windows). The advanced case handling options supported are set using one of the following options:

com.p4convert.p4.caseMode=FIRST
  • NONE - treat all paths as case sensitive (Linux).

  • LOWER - convert all paths to lower case

  • UPPER - convert all paths to upper case

  • FIRST - use the first encountered case combination (Windows)

When using Convert Mode the generated Perforce archive files are based on the platform's case sensitivity. However on Linux platforms it can be useful to store archive files as if on a case-insensitive server (p4d -C1). This can be simulated by setting the following option to true:

com.p4convert.p4.lowerCase=true

Important

If this option is set the path to the Perforce root directory, defined by com.p4convert.adv.p4root, must be in lower case and the case mode of FIRST must be used.

RCS Keyword expansion (svn:keywords)

By default, RCS keyword expansion attributes are imported; however setting the configuration option:

com.p4convert.svn.keepKeyword=true

Setting a value of false will ignore all previous keyword attributes and import the files as normal text. See keyword notes for known issues.

Merge Information (svn:mergeinfo)

Supports Subversion 1.5-1.7 merge information and calculates the corresponding Perforce integration credit for the various actions. The feature is not enabled by default and if required the following configuration option must be set to true:

com.p4convert.svn.mergeInfoEnabled=true