<!DOCTYPE html><html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Configuration // P4Convert: User Guide</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1 with Perforce customizations" />
<link rel="home" href="copyright.html" title="P4Convert: User Guide" />
<link rel="up" href="copyright.html" title="P4Convert: User Guide" />
<link rel="prev" href="chapter.setup.html" title="Setup" />
<link rel="next" href="chapter.running.html" title="Running P4Convert" />
<meta name="Section-title" content="Configuration" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="vendor/prettify/prettify.css" />
<link rel="stylesheet" href="css/perforce.css" />
<link rel="stylesheet" href="css/print.css" media="print" />
<link rel="shortcut icon" href="images/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="vendor/respond/respond.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/ie.css"/>
<![endif]-->
</head>
<body><a id="page-top"></a><noscript>
<div id="noscript">JavaScript is disabled on your browser. Please enable JavaScript to enjoy all the features of this site.</div>
</noscript>
<div id="header"><button name="toc" type="button" class="toc"><span class="glyphicon glyphicon-list"></span></button><span class="logo"><a href="http://www.perforce.com/documentation"></a></span><h1><a href="index.html" class="title"><span class="brand"></span><span class="guide-title">P4Convert: User Guide</span><span class="guide-subtitle">
(April 2015)
</span></a></h1><button name="search" type="button" class="search"><span class="glyphicon glyphicon-search"></span></button></div>
<div id="content" class="content" tabindex="-1">
<div class="container">
<!---->
<div class="chapter" id="chapter.config">
<div class="titlepage">
<div>
<div>
<h1 class="title">Configuration</h1>
</div>
</div>
</div>
<p>
The java conversion requires a configuration file to setup the necessary
options. A default configuration file <code class="filename">default.cfg</code> can
be generated by running the converter with the <em class="parameter"><code>--default</code></em>
parameter and specifying <em class="parameter"><code>CVS</code></em> or <em class="parameter"><code>SVN</code></em>.
</p>
<p>
For example: to generate a default configuration file for CVS, run...
</p><pre lang="bash" class="programlisting">
java -jar p4convert.jar --type=CVS --default
</pre><p>
Once you have <code class="filename">default.cfg</code>, copy it to
<code class="filename">yourconfig.cfg</code> and then customize it as needed for
the conversion.
</p>
<div class="section" id="config.general.core">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Core converter settings.</h2>
</div>
</div>
</div>
<p>
The following settings appear at the top of the configuration file
and are automatically defined at the time of generation. The
Core converter settings should not be modified.
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Configuration file schema version. Used to identify older configuration
formats.
</p><pre lang="ini" class="programlisting">
com.p4convert.core.schema=<em class="replaceable"><code>5.50</code></em>
</pre></li>
<li class="listitem">
<p>
SCM conversion type. Either set SVN or CVS configuration options.
</p><pre lang="ini" class="programlisting">
com.p4convert.core.scmType=<em class="replaceable"><code>SVN</code></em>
</pre></li>
<li class="listitem">
<p>
Reserved for testing framework. Must be set to <code class="literal">false</code>
for normal operation.
</p><pre lang="ini" class="programlisting">
com.p4convert.core.test=<em class="replaceable"><code>false</code></em>
</pre></li>
<li class="listitem">
<p>
Conversion tool's release version.
</p><pre lang="ini" class="programlisting">
com.p4convert.core.version=<em class="replaceable"><code>PUBLIC.10690</code></em>
</pre></li>
</ol>
</div>
</div>
<div class="section" id="config.general.p4">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">General Perforce converter settings.</h2>
</div>
</div>
</div>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Set the conversion mode to <code class="literal">IMPORT</code> for Import Mode
and to <code class="literal">CONVERT</code> for Conversion Mode.
</p><pre lang="ini" class="programlisting">
com.p4convert.p4.mode=<em class="replaceable"><code>IMPORT</code></em>
</pre></li>
<li class="listitem">
<p>
Import depot path and depot to be created, e.g.
<code class="literal">//<em class="replaceable"><code>import</code></em>/...</code>
</p><pre lang="bash" class="programlisting">
com.p4convert.core.depotPath=<em class="replaceable"><code>import</code></em>
</pre></li>
<li class="listitem">
<p>
An optional sub path can be specified below the depot, e.g.
<code class="literal">//import/<em class="replaceable"><code>sub</code></em>/...</code> (Note
that the path must end with a slash (<code class="literal">/</code>) even if
no path is used). The default value is <code class="literal">/</code>.
</p><pre lang="bash" class="programlisting">
com.p4convert.core.subPath=<em class="replaceable"><code>sub</code></em>/
</pre></li>
</ol>
</div>
</div>
<div class="section" id="config.general.svn">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">General Subversion converter settings.</h2>
</div>
</div>
</div>
<p>
If the configuration file has been correctly generated using the
<em class="parameter"><code>--type=SVN --default</code></em> the Subversion configuration
options will appear as a block using the <em class="parameter"><code>com.p4convert.svn
</code></em> name space. These settings will only apply if the SCM
mode is set to <em class="parameter"><code>SVN</code></em>:
</p><pre lang="ini" class="programlisting">
com.p4convert.core.scmType=<em class="replaceable"><code>SVN</code></em>
</pre><p>
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Local path to Subversion dump file.
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.dumpFile=<em class="replaceable"><code>/Users/bruno/MyDumpFile.dmp</code></em>
</pre></li>
</ol>
</div>
</div>
<div class="section" id="config.general.cvs">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">General CVS converter settings.</h2>
</div>
</div>
</div>
<p>
If the configuration file has been correctly generated using the
<em class="parameter"><code>--type=CVS --default</code></em> the CVS configuration
options will appear as a block using the <em class="parameter"><code>com.p4convert.cvs
</code></em> name space. These settings will only apply if the SCM
mode is set to <em class="parameter"><code>CVS</code></em>:
</p><pre lang="ini" class="programlisting">
com.p4convert.core.scmType=<em class="replaceable"><code>CVS</code></em>
</pre><p>
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Local path to CVSROOT files. (A deeper path is permitted to limit
the scope of the import).
</p><pre lang="ini" class="programlisting">
com.p4convert.cvs.cvsroot=<em class="replaceable"><code>/Users/bruno/CVSROOT/</code></em>
</pre></li>
<li class="listitem">
<p>
(Optionally) specify a CVS module to import from within the CVSROOT.
</p><pre lang="ini" class="programlisting">
com.p4convert.cvs.cvsmodule=<em class="replaceable"><code>projX</code></em>
</pre></li>
<li class="listitem">
<p>
CVS time window. When no <em class="parameter"><code>commitid</code></em> is
defined in the RCS file, the converter will calculate which
revisions should be grouped into a changelist. The time window
specifies the maximum range the converter should look ahead for
matching revisions. (milliseconds)
</p><pre lang="ini" class="programlisting">
com.p4convert.cvs.timeWindow=<em class="replaceable"><code>20000</code></em>
</pre></li>
<li class="listitem">
<p>
CVS temporary directory. All the CVS assets are reformatted into
full text files. The specified temporary directory is used to store
the content during conversion.
</p><pre lang="ini" class="programlisting">
com.p4convert.cvs.tmpDir=<em class="replaceable"><code>tmp</code></em>
</pre></li>
</ol>
</div>
</div>
<div class="section" id="config.mapping_CVS_paths">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Mapping CVS Paths</h2>
</div>
</div>
</div>
<p>
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.
</p>
<p>
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.
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
To enable CVS path mapping create a file called <em class="parameter"><code>path.map</code></em>
with regex and group match.
</p>
</li>
<li class="listitem">
<p>
Only the first matching entry is used.
</p>
</li>
<li class="listitem">
<p>
The regex and group match are seperated by ', ' (or in regex terms ',\s+').
</p>
</li>
<li class="listitem">
<p>
Lines starting with '#' are ignored.
</p>
</li>
</ol>
</div>
<p>
For example, 'trunk' is renamed to 'main', but other entries are left as-is.
</p><pre lang="perl" class="programlisting">
# path.map
trunk/(.*), //import/main/{1}
(.*), //import/{1}
</pre><p>
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.
</p><pre lang="perl" class="programlisting">
# path.map
main/projA/(.*), //import/projA/MAIN/{1}
release_(.*)/projA/(.*), //import/projA/REL{1}/{2}
(.*)/projA/(.*), //import/projA/TAG-{1}/{2}
(.*), //import/unexpected/{1}
</pre><p>
</p>
<div class="note admonition">
<h3 class="title">Note</h3>
Adding a catch all is a good idea (as shown in the last line with the
'unexpected' directory).
</div>
<p>
</p>
</div>
<div class="section" id="config.labeling_CVS_paths">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Labeling CVS Paths</h2>
</div>
</div>
</div>
<p>
CVS will tag revisions with symbols, some of these symbols may refer to
labels, whilst others are branch names. If labeling is disabled (default),
then only symbols with history are converted to Perforce branches, the
remaining symbols are ignored. However, if labels are enabled then the
remaining symbols from the branch detection are converted to Perforce Labels.
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
To enable labeling of CVS symbols tags, set the
<em class="parameter"><code>com.p4convert.cvs.labels</code></em> to
<em class="parameter"><code>true</code></em>.
</p>
</li>
<li class="listitem">
<p>
In multiple CVS conversions there is the potential for namespace clashing
if the label has been previously used. By default, the converter will use
the CVS symbol as the name for the Perforce label. However, this can be
formatted by setting the following option:
<em class="parameter"><code>com.p4convert.cvs.labelFormat</code></em>. The parameter
<em class="parameter"><code>{symbol}</code></em> will be substituted by the CVS symbol name.
</p>
<p>
For example:
</p><pre lang="ini" class="programlisting">
com.p4convert.cvs.labels=true
com.p4convert.cvs.labelFormat=import_{symbol}_label
</pre><p>
Will import a CVS symbol called <em class="parameter"><code>REL1.0</code></em> as a Perforce
label <em class="parameter"><code>import_REL1.0_label</code></em>.
</p>
</li>
</ol>
</div>
</div>
<div class="section" id="config.general.selective_and_incremental_conversions">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Subversion: Selective and Incremental Conversions</h2>
</div>
</div>
</div>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
The Subversion revision ranges can be limited using the configuration
options <em class="parameter"><code>startRevision</code></em> and
<em class="parameter"><code>endRevision</code></em>. The default is to start at
revision 1 and import all revisions, defined by setting
<em class="parameter"><code>endRevision</code></em> to 0.
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.start=1
com.p4convert.svn.end=0
</pre></li>
<li class="listitem">
<p>
Incremental conversions are possible using the Import Mode. It is
important to take note of the last imported Subversion revision and
start from the next revision for the subsequent import. For example:
to import the first 100 subversion revisions, set the config options
to:
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.start=1
com.p4convert.svn.end=100
</pre></li>
<li class="listitem">
<p>
At the start of the import the following summary is displayed: (In
this example only the first 100 revisions are imported out of 23000.)
</p><pre class="screen">
Importing Subversion ranges:
start: 1
end: 100
last: 23000
</pre></li>
<li class="listitem">
<p>
For the next incremental import (say another 100 revisions) set the
revision ranges to...
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.start=101
com.p4convert.svn.end=200
</pre></li>
<li class="listitem">
<p>
The start and end revisions can be override on the command line
using the <em class="parameter"><code>--start</code></em> and
<em class="parameter"><code>--end</code></em> flags. For example, importing just
Subversion revision 201.
</p><pre lang="ini" class="programlisting">
java -jar convert.jar --config=default.cfg --start=201 --end=201
</pre></li>
<li class="listitem">
<p>
In adition to overriding the start and end revisions you can
override Subversion dump file location using the
<em class="parameter"><code>--repo</code></em> flags. For example, a range of
revisions from an incremental dump.
</p><pre lang="ini" class="programlisting">
svnadmin dump /path/to/repo/ -r 202:300 --incremental > 202-300.dump
java -jar convert.jar --config=default.cfg --repo=202-300.dump --start=202 --end=300
</pre></li>
</ol>
</div>
</div>
<div class="section" id="config.filtering_subversion_paths">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Filtering Subversion paths</h2>
</div>
</div>
</div>
<p>
The default behavior is not to exclude any path in Subversion; however for
large repositories with many <code class="filename">tags/</code> folders or
situations where only part of a Subversion repository is to be converted
you may wish to exclude certain Subversion paths. Subversion path
exclusion is possible using two map files <code class="filename">exclude.map</code>
and <code class="filename">include.map</code>.
</p>
<p>
The filtering is based on matching the Subversion path to a regular
expression in the map files. The <code class="filename">exclude.map</code> file is
processed first and if the pattern matches part of the path then that path
is skipped. The <code class="filename">include.map</code> file can be used to
overlay the <code class="filename">exclude.map</code> file re-adding paths that
were skipped. Before a conversion can start the filters must be verified
against the Dump file (typically this is fairly quick and a displays a
progress indicator).
</p>
<p>
The verification step is to prevent the situation where an excluded path
is relied on at a later point in the history for a branch, copy or merge
action. If such a situation is found the paths are logged and the excluded
<em class="replaceable"><code>source path</code></em> is added to the
<code class="filename">issue.map</code> file. To resolve the issue the exclusion
should be removed from the <code class="filename">exclude.map</code> file or a
regular expression, based on the <code class="filename">issue.map</code> file,
added to the <code class="filename">include.map</code> file.
</p>
<p>
For example; to exclude all Subversion tags in the folder 'tags/', create
an exclusion map file <code class="filename">exclude.map</code>:
</p><pre lang="ini" class="programlisting">
# exclude Subversion tags:
^tags/.*
</pre><p>
Then start the conversion to verify the map:
</p><pre class="programlisting">
pallen-mac:main$ java -jar dist/p4convert.jar --config=Config/foo.cfg
loading ChangeMap: changeMap.txt
loading TypeMap: types.map
importing revisions: 1 to 20635 out of 20635
exclude.map: ^tags/.*
Verifying exclusion map...
issue: tags/rel-1.0.14/api
issue: tags/rel-1.0.14/sys
issue: tags/rel-2.0.3
Issues found, saving issue map...
Caught EXIT shutting down ...
</pre><p>
Looking at the reported issues the tags 'rel-1.0.14' and 'rel-2.0.3' have
some actions that conflict with our exclusion, to resolve this simply add
the exclusions to the 'include.map' file:
</p><pre lang="ini" class="programlisting">
# issues reported for tags/ folder
^tags/rel-1.0.14/.*
^tags/rel-2.0.3/.*
</pre></div>
<div class="section" id="config.labeling_subversion_paths">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Labeling Subversion Paths</h2>
</div>
</div>
</div>
<p>
Whilst Subversion does not have a specific label entity may users follow
the 'tags' convention. If a 'tag' path is pure (in that it has not had
subsequent changes to the content) it can be converted to a Perforce
label.
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
To enable labeling of Subversion tags, set the
<em class="parameter"><code>com.p4convert.svn.labels</code></em> to
<em class="parameter"><code>true</code></em> and define maps:
<code class="filename">exclude.map</code> and <code class="filename">include.map</code>.
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.labels=true
</pre></li>
<li class="listitem">
<p>
The maps are designed with resect to branches. The default behaviour is
for all Subversion tag operations to be imported as Perforce branches.
In order to change the behaviour and attempt to import the Subversion tag
as a Perforce label the path must be in the exclude map.
</p>
<p>
For example; to import all Subversion tags in the folder 'tags/' as
Perforce labels, create an exclusion map file
<code class="filename">exclude.map</code>:
</p><pre lang="ini" class="programlisting">
# exclude Subversion tags:
^tags/.*
</pre></li>
<li class="listitem">
<p>
A Perforce label will need a unique name space derived from the 'tags'
path. The conversion tool provides a depth and regular expression
configuration option to assist.
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.labelFormat=svn_label:{depth}
</pre><pre lang="ini" class="programlisting">
com.p4convert.svn.labelDepth=2
</pre><p>
The depth determins how much of the path to use for the unique label
name. Typically a value of '2' for convertional Subversion usage.
With a depth of '2' the first two elements of the 'tags' path are then
held in an array and used by a regular expression to generate the label
name.
</p>
<p>
For example, given a Subversion tag located <code class="filename">tags/1.0.0/</code>
the following regular expressions provide the coresponding label names:
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.labelFormat=label:{2} label:1.0.0
com.p4convert.svn.labelFormat={1}-{2} tags-1.0.0
</pre><div class="note admonition">
<h3 class="title">Note</h3>
<p>
An empty expression will use the original path.
</p>
</div><pre lang="ini" class="programlisting">
com.p4convert.svn.labelFormat= tags/1.0.0/
</pre><div class="note admonition">
<h3 class="title">Note</h3>
<p>
If a keyword of <em class="parameter"><code>{depth}</code></em> is used it will be
substituted with it's value.
</p>
</div><pre lang="ini" class="programlisting">
com.p4convert.svn.labelFormat=label_{depth} label_1.0.0
</pre></li>
</ol>
</div>
</div>
<div class="section" id="config.changelist_offset_options">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Changelist Offset options</h2>
</div>
</div>
</div>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
The default offset is <code class="literal">0</code> (i.e. not offsetting).
Offset is currently available for Convert Mode and allows subversion
revisions to be converted into Perforce changelists by a fixed offset:
</p><pre lang="ini" class="programlisting">
com.p4convert.p4.offset=0
</pre></li>
<li class="listitem">
<p>
After the conversion a <span class="emphasis"><em>changeMap</em></span> file is appended
locally containing a Subversion revision number to Perforce
change-list mapping. The file name is configured by the option:
</p><pre lang="ini" class="programlisting">
com.p4convert.log.changeMap=changeMap.txt
</pre><p>
A changemap looks like this:
</p><pre lang="ini" class="programlisting">
# <Change>, <SVN revision>
1, 1
2, 2
3, 3
...
</pre></li>
</ol>
</div>
</div>
<div class="section" id="config.unicode_support">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Unicode Support</h2>
</div>
</div>
</div>
<p>
The following Unicode enable options apply to Unicode support for Import
Mode and Convert Mode. The Charset options are only applicable to Import
Mode, when translating a file through the Perforce client. In Convert Mode
archive files are always written in UTF-8 for a Unicode enabled Perforce
server.
</p>
<p>
Defaults (for non-Unicode servers):
</p><pre lang="ini" class="programlisting">
com.p4convert.p4.unicode=false
com.p4convert.p4.translate=true
com.p4convert.p4.charset=<none>
</pre><p>
In some situations it is preferable to import text files as-is (untranslated).
Typically this is true for a non-unicode environment where all the user are on
Windows clients. To disable translation set the following option to
<em class="parameter"><code>false</code></em>.
</p><pre lang="ini" class="programlisting">
com.p4convert.p4.translate=false
</pre><p>
When translation is disabled high-ascii text uses the content type
<em class="parameter"><code>TEXT-RAW</code></em> and the following warning is disabled:
</p><pre lang="ini" class="programlisting">
... Non-unicode server, downgrading file to text
</pre><p>
Recommended configuration for a Unicode conversion:
</p><pre lang="ini" class="programlisting">
com.p4convert.p4.unicode=true
com.p4convert.p4.translate=true
com.p4convert.p4.charset=utf8
</pre><p>
For Unicode conversions set the JVM arg:
</p><pre lang="ini" class="programlisting">
-Dfile.encoding=UTF-8
</pre><p>
Some Solaris and Linux conversions may need the locale set:
</p><pre lang="bash" class="programlisting">
export LC_ALL=en_GB.UTF-8
</pre><p>
Once a Perforce server is switched to Unicode enabled mode
(<em class="parameter"><code>-xi</code></em>), all client workspaces need to define a
character set. For details see:
</p>
<p>
<a class="link" href="http://answers.perforce.com/articles/KB_Article/Internationalization-and-Localization" target="_top">http://answers.perforce.com/articles/KB_Article/Internationalization-and-Localization</a>
</p>
<div class="note admonition">
<h3 class="title">Note</h3>
<p>
A non-Unicode enabled Perforce Server will accept UTF16 files.
</p>
</div>
<div class="section" id="config.unicode_support.normalization">
<div class="titlepage">
<div>
<div>
<h3 class="title">Normalisation</h3>
</div>
</div>
</div>
<p>
Platform Unicode normalisation is detected when the configuration file
is generated, however it can be changed by setting the following
configuration option to <code class="literal">NFC</code> or
<code class="literal">NFD</code>:
</p><pre lang="ini" class="programlisting">
com.p4convert.p4.normalisation=NFD
</pre><p>
The default detection is based on the following:
</p>
<div class="informaltable">
<table border="0">
<colgroup>
<col class="platform" />
<col class="normalization" />
</colgroup>
<thead>
<tr>
<th>
<p>Platform</p>
</th>
<th>
<p>Normalization</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p>Windows</p>
</td>
<td>
<p><code class="literal">NFC</code></p>
</td>
</tr>
<tr>
<td>
<p>Mac</p>
</td>
<td>
<p><code class="literal">NFD</code></p>
</td>
</tr>
<tr>
<td>
<p>*nix/*nux</p>
</td>
<td>
<p><code class="literal">NFC</code></p>
</td>
</tr>
<tr>
<td>
<p>Sun</p>
</td>
<td>
<p><code class="literal">NFC</code></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="config.unicode_support.subversion_properties">
<div class="titlepage">
<div>
<div>
<h3 class="title">Subversion Properties</h3>
</div>
</div>
</div>
<p>
By default, the converter parses Subversion properties as UTF-8 strings.
The conversion uses properties such as <code class="literal">svn:log</code>,
<code class="literal">svn:author</code> for attributes in Perforce and must decode
the byte sequence to UTF-8. In some data sets Windows users may have
added high ASCII characters in one or more code pages. This release now
supports a configuration option:
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.propTextType=UNKNOWN
</pre><p>
The following strings denote the supported char-sets:
</p>
<table border="0" summary="Simple list" class="simplelist">
<tr>
<td>Big5</td>
<td>IBM424_rtl</td>
<td>ISO-8859-7</td>
<td>UTF-16LE</td>
</tr>
<tr>
<td>BINARY</td>
<td>ISO-2022-CN</td>
<td>ISO-8859-8</td>
<td>UTF-32BE</td>
</tr>
<tr>
<td>EUC-JP</td>
<td>ISO-2022-JP</td>
<td>ISO-8859-9</td>
<td>UTF-32LE</td>
</tr>
<tr>
<td>EUC-KR</td>
<td>ISO-2022-KR</td>
<td>KOI8-R</td>
<td>UTF-8</td>
</tr>
<tr>
<td>GB18030</td>
<td>ISO-8859-1</td>
<td>Shift_JIS</td>
<td>windows-1251</td>
</tr>
<tr>
<td>IBM420_ltr</td>
<td>ISO-8859-2</td>
<td>UNKNOWN</td>
<td>windows-1252</td>
</tr>
<tr>
<td>IBM420_rtl</td>
<td>ISO-8859-5</td>
<td>US-ASCII</td>
<td>windows-1254</td>
</tr>
<tr>
<td>IBM424_ltr</td>
<td>ISO-8859-6</td>
<td>UTF-16BE</td>
<td>windows-1256</td>
</tr>
</table>
<p>
The first scan is always <code class="literal">UTF-8</code> followed by the
configuration option. <code class="literal">BINARY</code> implies a skip and the
string <code class="literal"><binary property></code> is inserted.
</p>
</div>
</div>
<div class="section" id="config.advanced">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Advanced Configuration</h2>
</div>
</div>
</div>
<div class="section" id="config.advanced.directory_properties">
<div class="titlepage">
<div>
<div>
<h3 class="title">Directory Properties</h3>
</div>
</div>
</div>
<p>
The following options allow Subversion Directory Properties to be stored
as versioned files in Perforce. To enable this mode set the following
property to <code class="literal">true</code>:
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.propEnabled=true
</pre><p>
To select the property name and format: (Note: only
<code class="literal">ini</code> mode is supported)
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.propEncoding=ini
com.p4convert.svn.propName=.svn.properties
</pre></div>
<div class="section" id="config.advanced.empty_changelists">
<div class="titlepage">
<div>
<div>
<h3 class="title">Empty changelists</h3>
</div>
</div>
</div>
<p>
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.
</p><pre lang="ini" class="programlisting">
com.p4convert.p4.skipEmpty=false
</pre></div>
<div class="section" id="config.advanced.username_translation">
<div class="titlepage">
<div>
<div>
<h3 class="title">Username translation</h3>
</div>
</div>
</div>
<p>
A username map file (<code class="filename">users.map</code>) can be generated
using the <em class="parameter"><code>--users</code></em> option and then the
right-hand-side modified with the new user name. The rename will only
occur if the conversion tool finds the <code class="filename">users.map</code>
file in the current working directory.
Username mapping is not currently supported for CVS conversions.
</p>
</div>
<div class="section" id="config.advanced.binary_file_detection">
<div class="titlepage">
<div>
<div>
<h3 class="title">Binary file detection</h3>
</div>
</div>
</div>
<p>
Binary files can be identified by adding their extensions to the type
map file <code class="filename">types.map</code>. The format is based on Perforce
typemap spec, however it is limited to paths of the form
<code class="filename">//...<em class="replaceable"><code>.ext</code></em></code> (where
<em class="replaceable"><code>.ext</code></em> is the binary extension).
</p>
<p>
Default Type map (<code class="filename">types.map</code>):
</p><pre class="programlisting">
TypeMap:
binary //....zip
binary //....gif
binary //....png
binary //....jpg
binary //....dll
binary //....class
binary //....jar
binary //....ecsfr
</pre><p>
Modification bits (<code class="literal">+mxwlk</code>) 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.
</p>
<div class="warning admonition">
<h3 class="title">Warning</h3>
<p>
ICU4J may incorrectly identify small binary files as text creating
sync issues on Windows clients.
</p>
</div>
</div>
<div class="section" id="config.advanced.changelist_description_format">
<div class="titlepage">
<div>
<div>
<h3 class="title">Changelist Description Format</h3>
</div>
</div>
</div>
<p>
The <em class="parameter"><code>logRevID</code></em> option can be used to reformat the
Subversion revision descriptions to include the revision ID using the
template:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<em class="replaceable"><code><rev></code></em> substituted with the
Subversion revision
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable"><code><description></code></em> substituted with the
Subversion log
</p>
</li>
</ul>
</div>
<p>
The default value (as-is):
</p><pre lang="ini" class="programlisting">
com.p4convert.p4.logRevID=<description>
</pre></div>
<div class="section" id="config.advanced.case_sensitivity">
<div class="titlepage">
<div>
<div>
<h3 class="title">Case Sensitivity</h3>
</div>
</div>
</div>
<p>
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:
</p><pre lang="ini" class="programlisting">
com.p4convert.p4.caseMode=FIRST
</pre><div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">NONE</code> - treat all paths as case sensitive (Linux).
</p>
</li>
<li class="listitem">
<p>
<code class="literal">LOWER</code> - convert all paths to lower case
</p>
</li>
<li class="listitem">
<p>
<code class="literal">UPPER</code> - convert all paths to upper case
</p>
</li>
<li class="listitem">
<p>
<code class="literal">FIRST</code> - use the first encountered case
combination (Windows)
</p>
</li>
</ul>
</div>
<p>
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
(<span class="command"><strong>p4d -C1</strong></span>). This can be simulated by setting the following
option to <code class="literal">true</code>:
</p><pre lang="ini" class="programlisting">
com.p4convert.p4.lowerCase=true
</pre><div class="important admonition">
<h3 class="title">Important</h3>
<p>
If this option is set the path to the Perforce root directory, defined
by <em class="parameter"><code>com.p4convert.adv.p4root</code></em>, must be in
<span class="bold"><strong>lower case</strong></span> and the case mode of
<code class="literal">FIRST</code> must be used.
</p>
</div>
</div>
<div class="section" id="config.advanced.rcs_keyword_expansion">
<div class="titlepage">
<div>
<div>
<h3 class="title">RCS Keyword expansion (svn:keywords)</h3>
</div>
</div>
</div>
<p>
By default, RCS keyword expansion attributes are imported; however
setting the configuration option:
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.keepKeyword=true
</pre><p>
Setting a value of <code class="literal">false</code> will ignore all previous
keyword attributes and import the files as normal text. See
<a class="link" href="chapter.notes.html#notes.keyword_expansion_issues" title="Keyword Expansion Issues:">keyword notes</a> for
known issues.
</p>
</div>
<div class="section" id="config.advanced.merge_information">
<div class="titlepage">
<div>
<div>
<h3 class="title">Merge Information (svn:mergeinfo)</h3>
</div>
</div>
</div>
<p>
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:
</p><pre lang="ini" class="programlisting">
com.p4convert.svn.mergeInfoEnabled=true
</pre></div>
</div>
</div>
</div>
</div>
<div id="nav" class="toc">
<div class="cover"></div>
<ul class="toc nav">
<li><a href="index.html"><span class="prefix"></span>What is p4convert for?</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="index.html#about.import_mode"><span class="prefix"></span>Import Mode (front door)</a></li>
<li><a href="index.html#about.convert_mode"><span class="prefix"></span>Convert Mode (back door)</a></li>
<li><a href="index.html#about.incremental_updates"><span class="prefix"></span>Incremental Updates (front door)</a></li>
</ul>
</li>
<li><a href="chapter.setup.html"><span class="prefix">1. </span>Setup</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="chapter.setup.html#setup.requirements"><span class="prefix"></span>System Requirements</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="chapter.setup.html#setup.requirements.resource_tips"><span class="prefix"></span>Resource Tips:</a></li>
</ul>
</li>
<li><a href="chapter.setup.html#setup.caveats"><span class="prefix"></span>Caveats</a></li>
<li><a href="chapter.setup.html#setup.usage"><span class="prefix"></span>Setup and Usage</a></li>
<li><a href="chapter.setup.html#setup.generate_dump_file"><span class="prefix"></span>Generating a Subversion Dump file</a></li>
<li><a href="chapter.setup.html#setup.cvs_root"><span class="prefix"></span>Selecting a CVS root</a></li>
</ul>
</li>
<li class="active"><a href="chapter.config.html"><span class="prefix">2. </span>Configuration</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="chapter.config.html#config.general.core"><span class="prefix"></span>Core converter settings.</a></li>
<li><a href="chapter.config.html#config.general.p4"><span class="prefix"></span>General Perforce converter settings.</a></li>
<li><a href="chapter.config.html#config.general.svn"><span class="prefix"></span>General Subversion converter settings.</a></li>
<li><a href="chapter.config.html#config.general.cvs"><span class="prefix"></span>General CVS converter settings.</a></li>
<li><a href="chapter.config.html#config.mapping_CVS_paths"><span class="prefix"></span>Mapping CVS Paths</a></li>
<li><a href="chapter.config.html#config.labeling_CVS_paths"><span class="prefix"></span>Labeling CVS Paths</a></li>
<li><a href="chapter.config.html#config.general.selective_and_incremental_conversions"><span class="prefix"></span>Subversion: Selective and Incremental Conversions</a></li>
<li><a href="chapter.config.html#config.filtering_subversion_paths"><span class="prefix"></span>Filtering Subversion paths</a></li>
<li><a href="chapter.config.html#config.labeling_subversion_paths"><span class="prefix"></span>Labeling Subversion Paths</a></li>
<li><a href="chapter.config.html#config.changelist_offset_options"><span class="prefix"></span>Changelist Offset options</a></li>
<li><a href="chapter.config.html#config.unicode_support"><span class="prefix"></span>Unicode Support</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="chapter.config.html#config.unicode_support.normalization"><span class="prefix"></span>Normalisation</a></li>
<li><a href="chapter.config.html#config.unicode_support.subversion_properties"><span class="prefix"></span>Subversion Properties</a></li>
</ul>
</li>
<li><a href="chapter.config.html#config.advanced"><span class="prefix"></span>Advanced Configuration</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="chapter.config.html#config.advanced.directory_properties"><span class="prefix"></span>Directory Properties</a></li>
<li><a href="chapter.config.html#config.advanced.empty_changelists"><span class="prefix"></span>Empty changelists</a></li>
<li><a href="chapter.config.html#config.advanced.username_translation"><span class="prefix"></span>Username translation</a></li>
<li><a href="chapter.config.html#config.advanced.binary_file_detection"><span class="prefix"></span>Binary file detection</a></li>
<li><a href="chapter.config.html#config.advanced.changelist_description_format"><span class="prefix"></span>Changelist Description Format</a></li>
<li><a href="chapter.config.html#config.advanced.case_sensitivity"><span class="prefix"></span>Case Sensitivity</a></li>
<li><a href="chapter.config.html#config.advanced.rcs_keyword_expansion"><span class="prefix"></span>RCS Keyword expansion (svn:keywords)</a></li>
<li><a href="chapter.config.html#config.advanced.merge_information"><span class="prefix"></span>Merge Information (svn:mergeinfo)</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="chapter.running.html"><span class="prefix">3. </span>Running P4Convert</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="chapter.running.html#running.import_mode"><span class="prefix"></span>Import Mode</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="chapter.running.html#running.import_mode.configuration"><span class="prefix"></span>Configuration options specific to Import Mode</a></li>
</ul>
</li>
<li><a href="chapter.running.html#running.convert_mode"><span class="prefix"></span>Convert Mode</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="chapter.running.html#running.convert_mode.configuration"><span class="prefix"></span>Configuration options specific to Conversion Mode</a></li>
</ul>
</li>
<li><a href="chapter.running.html#running.post_conversion"><span class="prefix"></span>Post Conversion [Conversion Mode]</a></li>
</ul>
</li>
<li><a href="chapter.notes.html"><span class="prefix">4. </span>Notes</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="chapter.notes.html#notes.keyword_expansion_issues"><span class="prefix"></span>Keyword Expansion Issues:</a></li>
<li><a href="chapter.notes.html#notes.verification"><span class="prefix"></span>Verification</a></li>
<li><a href="chapter.notes.html#notes.output"><span class="prefix"></span>Output and Logs</a><a class="expander"><span class="glyphicon glyphicon-chevron-down"></span></a><ul class="nav">
<li><a href="chapter.notes.html#notes.output.console"><span class="prefix"></span>Console output and logging configuration options</a></li>
<li><a href="chapter.notes.html#notes.output.future"><span class="prefix"></span>These options are reserved for testing or future enhancements:</a></li>
<li><a href="chapter.notes.html#notes.output.reading"><span class="prefix"></span>Reading Console/Logging output</a></li>
</ul>
</li>
<li><a href="chapter.notes.html#notes.errors"><span class="prefix"></span>Errors</a></li>
</ul>
</li>
</ul>
</div>
<div id="search">
<div class="input"><input id="search-text" type="search" placeholder="Search this guide" /><button name="clear" type="button" class="clear"><span class="glyphicon glyphicon-remove-sign"></span></button></div>
<div class="controls">
<div class="substring"><input type="checkbox" class="substring" name="substring" value="hide" checked="1" /><span class="description">Hide partial matches</span></div>
<div class="highlighter"><input type="checkbox" class="highlight" name="highlight" value="show" checked="1" /><span class="description">Highlight matches</span></div>
</div>
<div class="count"><span class="number">0</span> matching pages
</div>
<ul class="results"></ul>
</div>
<div id="footer">
<div class="container"><a accesskey="p" class="nav-prev" title="Press 'p', or left-arrow, to view the previous page" href="chapter.setup.html"><span class="glyphicon glyphicon-chevron-left"></span><div class="label">Previous</div>
<div class="title">Setup</div></a><a accesskey="n" class="nav-next" title="Press 'n', or right-arrow, to view the next page" href="chapter.running.html"><span class="glyphicon glyphicon-chevron-right"></span><div class="label">Next</div>
<div class="title">Running P4Convert</div></a></div>
</div><script type="text/javascript" src="vendor/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript" src="vendor/bootstrap/js/bootstrap.js"></script><script type="text/javascript" src="vendor/cookie/jquery.cookie.js"></script><script type="text/javascript" src="vendor/highlight/jquery.highlight.js"></script><script type="text/javascript" src="vendor/jsrender/jsrender.js"></script><script type="text/javascript" src="vendor/touchwipe/jquery.touchwipe.min.js"></script><script type="text/javascript" src="vendor/prettify/prettify.js"></script><script type="text/javascript" src="js/index.js"></script><script type="text/javascript" src="js/perforce.js"></script></body>
</html>