<!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>Notes // 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.running.html" title="Running P4Convert" />
<meta name="Section-title" content="Notes" />
<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.notes">
<div class="titlepage">
<div>
<div>
<h1 class="title">Notes</h1>
</div>
</div>
</div>
<div class="section" id="notes.keyword_expansion_issues">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Keyword Expansion Issues:</h2>
</div>
</div>
</div>
<p>
The conversion process preserves keyword file types and sets these files
in Perforce with the +k modifier. However keywords in Subversion and
Perforce are expanded differently. For example: In Subversion the keyword
<code class="literal">$Revision$</code> expands to:
</p><pre class="screen">
$Revision: 25005 $ (a change number in Perforce)
</pre><p>
Another example is the keyword <code class="literal">$Date$</code>, which in
Subversion gives you the time as well...
</p><pre class="screen">
$Date: 2006-02-17 12:09:10 +0000 (Fri, 17 Feb 2006) $
</pre><p>
and in Perforce...
</p><pre class="screen">
$Date: 2006/02/17 $
</pre><p>
Here is a list of alternatives, (based on the above example):
</p><pre class="screen">
$Revision$ ==> $Change$ gives $Change: 25005 $
$Date$ ==> $DateTime$ gives $DateTime: 2006/02/17 12:09:10 $
</pre><p>
Due to the differences in keyword expansion the MD5 sum in Subversion is
not valid for use in Perforce. This is why any keyword expanded files have
an empty MD5 sum and why the <span class="command"><strong>p4 verify -u //...</strong></span> command
is recommended in the 'Optional Steps' section.
</p>
</div>
<div class="section" id="notes.verification">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Verification</h2>
</div>
</div>
</div>
<p>
Verification can be performed using a running Subversion server and
comparing the differences in files in Perforce using the audit log. To
enable the audit log set the following option to <code class="literal">true</code>
and choose the file name.
</p><pre lang="ini" class="programlisting">
com.p4convert.log.audit.enabled=true
com.p4convert.log.audit.filename=audit.log
</pre><p>
A sample line of the audit log:
</p><pre class="screen">
# <SVN path>, <SVN revision>, <P4 change>, <MD5 sum>
trunk/src/foo.c, 1, 1, 1234567890abcdef1234567890abcdef
</pre></div>
<div class="section" id="notes.output">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Output and Logs</h2>
</div>
</div>
</div>
<div class="section" id="notes.output.console">
<div class="titlepage">
<div>
<div>
<h3 class="title">Console output and logging configuration options</h3>
</div>
</div>
</div>
<p>
The default SLF4J logging options can be overwritten with another
configuration file; specify the
<em class="parameter"><code>log4j.configuration</code></em> option with a local file,
using the syntax:
</p>
<p>
<code class="literal">file:<em class="replaceable"><code>your_local_file</code></em></code>
</p><pre lang="bash" class="programlisting">
java -Dlog4j.configuration=file:log4j.xml -jar p4convert.jar
</pre><p>
Please use or refer to the sample <code class="filename">debug.log4j.xml</code>
for logging options.
</p>
</div>
<div class="section" id="notes.output.future">
<div class="titlepage">
<div>
<div>
<h3 class="title">These options are reserved for testing or future enhancements:</h3>
</div>
</div>
</div><pre lang="ini" class="programlisting">
com.p4convert.core.test
com.p4convert.core.version
com.p4convert.svn.emptyDirEnabled
com.p4convert.svn.emptyDirName
</pre></div>
<div class="section" id="notes.output.reading">
<div class="titlepage">
<div>
<div>
<h3 class="title">Reading Console/Logging output</h3>
</div>
</div>
</div><pre class="screen">
Importing Subversion ranges:
start: 1
end: 23091
last: 23091
1.0 A:D - trunk
1.1 A:D - trunk/src
1.2 A:F - trunk/src/foo.c (UTF-8)
mapping: r1 => @1
2.0 A:F - trunk/src/bar.png (BINARY)
mapping: r2 => @2
...
</pre><p>
Explanation of output lines, for example:
</p><pre class="screen">
1.2 A:F - trunk/src/foo.c (UTF-8)</pre><p>
The numbering <code class="literal">1.2</code> refers to the current Subversion
revision and the node action. (<code class="literal">1</code> Subversion revision
1 and <code class="literal">.2</code> = the third node action
as <code class="literal">.0</code> would be the first index)
</p>
<p>
The letters <code class="literal">A:F</code> refers to the Subversion action and
if it is a file or directory operation.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
A Add
</p>
</li>
<li class="listitem">
<p>
B Branch
</p>
</li>
<li class="listitem">
<p>
E Edit
</p>
</li>
<li class="listitem">
<p>
I Integrate (merge fromNode)
</p>
</li>
<li class="listitem">
<p>
M Merge (svn:mergeinfo)
</p>
</li>
<li class="listitem">
<p>
C Copy (svn replace action with fromNode)
</p>
</li>
<li class="listitem">
<p>
U Update (svn replace action)
</p>
</li>
<li class="listitem">
<p>
R Remove (delete)
</p>
</li>
<li class="listitem">
<p>
F File
</p>
</li>
<li class="listitem">
<p>
D Directory
</p>
</li>
</ul>
</div>
<p>
The subversion path <code class="filename">trunk/src/foo.c</code> is followed by
the detected type.
</p>
<div class="informaltable">
<table border="0">
<colgroup>
<col class="detected_type" />
<col class="perforce_type" />
</colgroup>
<thead>
<tr>
<th>
<p>
Detected Type
</p>
</th>
<th>
<p>
Perforce Base Type
</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p>
UTF-8
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
UTF-16BE
</p>
</td>
<td>
<p>
utf16
</p>
</td>
</tr>
<tr>
<td>
<p>
UTF-16LE
</p>
</td>
<td>
<p>
utf16
</p>
</td>
</tr>
<tr>
<td>
<p>
UTF-32BE
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
UTF-32LE
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
Shift_JIS
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
ISO-2022-JP
</p>
</td>
<td>
<p>
downgraded to binary
</p>
</td>
</tr>
<tr>
<td>
<p>
ISO-2022-CN
</p>
</td>
<td>
<p>
downgraded to binary
</p>
</td>
</tr>
<tr>
<td>
<p>
ISO-2022-KR
</p>
</td>
<td>
<p>
downgraded to binary
</p>
</td>
</tr>
<tr>
<td>
<p>
GB18030
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
EUC-JP
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
EUC-KR
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
Big5
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
ISO-8859-1
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
ISO-8859-2
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
ISO-8859-5
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
ISO-8859-6
</p>
</td>
<td>
<p>
downgraded to binary
</p>
</td>
</tr>
<tr>
<td>
<p>
ISO-8859-7
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
ISO-8859-8
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
windows-1251
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
windows-1254
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
windows-1256
</p>
</td>
<td>
<p>
downgraded to binary
</p>
</td>
</tr>
<tr>
<td>
<p>
KOI8-R
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
ISO-8859-9
</p>
</td>
<td>
<p>
Unicode
</p>
</td>
</tr>
<tr>
<td>
<p>
IBM424_rtl
</p>
</td>
<td>
<p>
downgraded to binary
</p>
</td>
</tr>
<tr>
<td>
<p>
IBM424_ltr
</p>
</td>
<td>
<p>
downgraded to binary
</p>
</td>
</tr>
<tr>
<td>
<p>
IBM420_rtl
</p>
</td>
<td>
<p>
downgraded to binary
</p>
</td>
</tr>
<tr>
<td>
<p>
IBM420_ltr
</p>
</td>
<td>
<p>
downgraded to binary
</p>
</td>
</tr>
<tr>
<td>
<p>
BINARY
</p>
</td>
<td>
<p>
binary
</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note admonition">
<h3 class="title">Note</h3>
<p>
The detected type is based on language detection using ICU4J and not
Subversion MIME or Perforce detection.
</p>
</div>
<p>
Finally <code class="literal">mapping: r223 => @223</code>' refers to the
Subversion revision number (<code class="literal">r223</code>) to the Perforce
changelist number (<code class="literal">@223</code>). Typically 1:1 unless offset
or merged against an live or pre-existing Perforce Server.
</p>
</div>
</div>
<div class="section" id="notes.errors">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">Errors</h2>
</div>
</div>
</div>
<p>
In Import Mode, Perforce related <span class="command"><strong>p4-java</strong></span> messages are
reported as warnings and should be verified, for example:
</p><pre class="screen">
46.3 A:F - repo/trunk/my.file
WARNING: p4java: //import/repo/trunk/my.file - file(s) up-to-date.
</pre><p>
In Conversion Mode, errors are reported as <span class="emphasis"><em>Panics</em></span> and
an exception is thrown.
</p>
<p>
Problematic Subversion dump records can be extracted and sent to Perforce
when it is not possible to send in the whole dumpfile. The extracted
dumpfile only contains meta-data and the file content is removed and
replaced with a block count.
</p>
<p>
During an exception note the Subversion revision and node ID (the example
above has a revision number of 46 and a node number of 3). Then run the
following command to extract the problematic record, for example:
</p><pre lang="bash" class="programlisting">
$ java -jar dist/p4convert.jar --type=SVN --repo=mysvndump.dump --extract=46.3
searching for node: 46.3...
Node-path: repo/trunk/my.file
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 308
Text-content-md5: 6a339b6ccf2af72d77169ef29b98eb0b
Content-length: 318
PROPS-END
</pre><p>
A file is then generated called <code class="filename">node.46.3.dump</code> and
will contain the Subversion record to be sent to Perforces, as well as the
Subversion meta-data (everything after <code class="literal">searching for node:
46.3...</code>).
</p>
</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><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 class="active"><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.running.html"><span class="glyphicon glyphicon-chevron-left"></span><div class="label">Previous</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>