Debian Codegraph @

doc/html/ext-convert.html

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" />
7 <title>convert</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="convert">
12 <span id="ext-convert"></span>
13 <h1 class="title">convert</h1>
14
15 <div class="contents htmlonly topic" id="contents">
16 <p class="topic-title"><a class="reference internal" href="#top">Contents</a></p>
17 <ul class="simple">
18 <li><a class="reference internal" href="#commands" id="toc-entry-1">Commands</a><ul>
19 <li><a class="reference internal" href="#uncategorized-commands" id="toc-entry-2">Uncategorized commands</a></li>
20 </ul>
21 </li>
22 </ul>
23 </div>
24 <p>import revisions from foreign VCS repositories into Mercurial</p>
25 <div class="section" id="commands">
26 <h1><a class="toc-backref" href="#contents">Commands</a></h1>
27 <div class="section" id="uncategorized-commands">
28 <h2><a class="toc-backref" href="#contents">Uncategorized commands</a></h2>
29 <div class="section" id="convert-1">
30 <h3>convert</h3>
31 <p>convert a foreign SCM repository to a Mercurial one.:</p>
32 <pre class="literal-block">
33 hg convert [OPTION]... SOURCE [DEST [REVMAP]]
34 </pre>
35 <p>Accepted source formats [identifiers]:</p>
36 <ul class="simple">
37 <li>Mercurial [hg]</li>
38 <li>CVS [cvs]</li>
39 <li>Darcs [darcs]</li>
40 <li>git [git]</li>
41 <li>Subversion [svn]</li>
42 <li>Monotone [mtn]</li>
43 <li>GNU Arch [gnuarch]</li>
44 <li>Bazaar [bzr]</li>
45 <li>Perforce [p4]</li>
46 </ul>
47 <p>Accepted destination formats [identifiers]:</p>
48 <ul class="simple">
49 <li>Mercurial [hg]</li>
50 <li>Subversion [svn] (history on branches is not preserved)</li>
51 </ul>
52 <p>If no revision is given, all revisions will be converted.
53 Otherwise, convert will only import up to the named revision
54 (given in a format understood by the source).</p>
55 <p>If no destination directory name is specified, it defaults to the
56 basename of the source with <tt class="docutils literal"><span class="pre">-hg</span></tt> appended. If the destination
57 repository doesn't exist, it will be created.</p>
58 <p>By default, all sources except Mercurial will use --branchsort.
59 Mercurial uses --sourcesort to preserve original revision numbers
60 order. Sort modes have the following effects:</p>
61 <table class="docutils option-list" frame="void" rules="none">
62 <col class="option" />
63 <col class="description" />
64 <tbody valign="top">
65 <tr><td class="option-group">
66 <kbd><span class="option">--branchsort</span></kbd></td>
67 <td>convert from parent to child revision when possible,
68 which means branches are usually converted one after
69 the other. It generates more compact repositories.</td></tr>
70 <tr><td class="option-group">
71 <kbd><span class="option">--datesort</span></kbd></td>
72 <td>sort revisions by date. Converted repositories have
73 good-looking changelogs but are often an order of
74 magnitude larger than the same ones generated by
75 --branchsort.</td></tr>
76 <tr><td class="option-group">
77 <kbd><span class="option">--sourcesort</span></kbd></td>
78 <td>try to preserve source revisions order, only
79 supported by Mercurial sources.</td></tr>
80 <tr><td class="option-group">
81 <kbd><span class="option">--closesort</span></kbd></td>
82 <td>try to move closed revisions as close as possible
83 to parent branches, only supported by Mercurial
84 sources.</td></tr>
85 </tbody>
86 </table>
87 <p>If <tt class="docutils literal">REVMAP</tt> isn't given, it will be put in a default location
88 (<tt class="docutils literal"><span class="pre">&lt;dest&gt;/.hg/shamap</span></tt> by default). The <tt class="docutils literal">REVMAP</tt> is a simple
89 text file that maps each source commit ID to the destination ID
90 for that revision, like so:</p>
91 <pre class="literal-block">
92 &lt;source ID&gt; &lt;destination ID&gt;
93 </pre>
94 <p>If the file doesn't exist, it's automatically created. It's
95 updated on each commit copied, so <a class="reference external" href="hg-convert.html"><tt class="docutils literal">hg convert</tt></a> can be interrupted
96 and can be run repeatedly to copy new commits.</p>
97 <p>The authormap is a simple text file that maps each source commit
98 author to a destination commit author. It is handy for source SCMs
99 that use unix logins to identify authors (e.g.: CVS). One line per
100 author mapping and the line format is:</p>
101 <pre class="literal-block">
102 source author = destination author
103 </pre>
104 <p>Empty lines and lines starting with a <tt class="docutils literal">#</tt> are ignored.</p>
105 <p>The filemap is a file that allows filtering and remapping of files
106 and directories. Each line can contain one of the following
107 directives:</p>
108 <pre class="literal-block">
109 include path/to/file-or-dir
110
111 exclude path/to/file-or-dir
112
113 rename path/to/source path/to/destination
114 </pre>
115 <p>Comment lines start with <tt class="docutils literal">#</tt>. A specified path matches if it
116 equals the full relative name of a file or one of its parent
117 directories. The <tt class="docutils literal">include</tt> or <tt class="docutils literal">exclude</tt> directive with the
118 longest matching path applies, so line order does not matter.</p>
119 <p>The <tt class="docutils literal">include</tt> directive causes a file, or all files under a
120 directory, to be included in the destination repository. The default
121 if there are no <tt class="docutils literal">include</tt> statements is to include everything.
122 If there are any <tt class="docutils literal">include</tt> statements, nothing else is included.
123 The <tt class="docutils literal">exclude</tt> directive causes files or directories to
124 be omitted. The <tt class="docutils literal">rename</tt> directive renames a file or directory if
125 it is converted. To rename from a subdirectory into the root of
126 the repository, use <tt class="docutils literal">.</tt> as the path to rename to.</p>
127 <p><tt class="docutils literal"><span class="pre">--full</span></tt> will make sure the converted changesets contain exactly
128 the right files with the right content. It will make a full
129 conversion of all files, not just the ones that have
130 changed. Files that already are correct will not be changed. This
131 can be used to apply filemap changes when converting
132 incrementally. This is currently only supported for Mercurial and
133 Subversion.</p>
134 <p>The splicemap is a file that allows insertion of synthetic
135 history, letting you specify the parents of a revision. This is
136 useful if you want to e.g. give a Subversion merge two parents, or
137 graft two disconnected series of history together. Each entry
138 contains a key, followed by a space, followed by one or two
139 comma-separated values:</p>
140 <pre class="literal-block">
141 key parent1, parent2
142 </pre>
143 <p>The key is the revision ID in the source
144 revision control system whose parents should be modified (same
145 format as a key in .hg/shamap). The values are the revision IDs
146 (in either the source or destination revision control system) that
147 should be used as the new parents for that node. For example, if
148 you have merged &quot;release-1.0&quot; into &quot;trunk&quot;, then you should
149 specify the revision on &quot;trunk&quot; as the first parent and the one on
150 the &quot;release-1.0&quot; branch as the second.</p>
151 <p>The branchmap is a file that allows you to rename a branch when it is
152 being brought in from whatever external repository. When used in
153 conjunction with a splicemap, it allows for a powerful combination
154 to help fix even the most badly mismanaged repositories and turn them
155 into nicely structured Mercurial repositories. The branchmap contains
156 lines of the form:</p>
157 <pre class="literal-block">
158 original_branch_name new_branch_name
159 </pre>
160 <p>where &quot;original_branch_name&quot; is the name of the branch in the
161 source repository, and &quot;new_branch_name&quot; is the name of the branch
162 is the destination repository. No whitespace is allowed in the new
163 branch name. This can be used to (for instance) move code in one
164 repository from &quot;default&quot; to a named branch.</p>
165 <div class="section" id="mercurial-source">
166 <h4>Mercurial Source</h4>
167 <p>The Mercurial source recognizes the following configuration
168 options, which you can set on the command line with <tt class="docutils literal"><span class="pre">--config</span></tt>:</p>
169 <table class="docutils field-list" frame="void" rules="none">
170 <col class="field-name" />
171 <col class="field-body" />
172 <tbody valign="top">
173 <tr class="field"><th class="field-name" colspan="2">convert.hg.ignoreerrors:</th></tr>
174 <tr class="field"><td>&nbsp;</td><td class="field-body">ignore integrity errors when reading.
175 Use it to fix Mercurial repositories with missing revlogs, by
176 converting from and to Mercurial. Default is False.</td>
177 </tr>
178 <tr class="field"><th class="field-name" colspan="2">convert.hg.saverev:</th></tr>
179 <tr class="field"><td>&nbsp;</td><td class="field-body">store original revision ID in changeset
180 (forces target IDs to change). It takes a boolean argument and
181 defaults to False.</td>
182 </tr>
183 <tr class="field"><th class="field-name" colspan="2">convert.hg.startrev:</th></tr>
184 <tr class="field"><td>&nbsp;</td><td class="field-body">specify the initial Mercurial revision.
185 The default is 0.</td>
186 </tr>
187 <tr class="field"><th class="field-name" colspan="2">convert.hg.revs:</th></tr>
188 <tr class="field"><td>&nbsp;</td><td class="field-body">revset specifying the source revisions to convert.</td>
189 </tr>
190 </tbody>
191 </table>
192 </div>
193 <div class="section" id="bazaar-source">
194 <h4>Bazaar Source</h4>
195 <p>The following options can be used with <tt class="docutils literal"><span class="pre">--config</span></tt>:</p>
196 <table class="docutils field-list" frame="void" rules="none">
197 <col class="field-name" />
198 <col class="field-body" />
199 <tbody valign="top">
200 <tr class="field"><th class="field-name" colspan="2">convert.bzr.saverev:</th></tr>
201 <tr class="field"><td>&nbsp;</td><td class="field-body">whether to store the original Bazaar commit ID in
202 the metadata of the destination commit. The default is True.</td>
203 </tr>
204 </tbody>
205 </table>
206 </div>
207 <div class="section" id="cvs-source">
208 <h4>CVS Source</h4>
209 <p>CVS source will use a sandbox (i.e. a checked-out copy) from CVS
210 to indicate the starting point of what will be converted. Direct
211 access to the repository files is not needed, unless of course the
212 repository is <tt class="docutils literal">:local:</tt>. The conversion uses the top level
213 directory in the sandbox to find the CVS repository, and then uses
214 CVS rlog commands to find files to convert. This means that unless
215 a filemap is given, all files under the starting directory will be
216 converted, and that any directory reorganization in the CVS
217 sandbox is ignored.</p>
218 <p>The following options can be used with <tt class="docutils literal"><span class="pre">--config</span></tt>:</p>
219 <table class="docutils field-list" frame="void" rules="none">
220 <col class="field-name" />
221 <col class="field-body" />
222 <tbody valign="top">
223 <tr class="field"><th class="field-name" colspan="2">convert.cvsps.cache:</th></tr>
224 <tr class="field"><td>&nbsp;</td><td class="field-body">Set to False to disable remote log caching,
225 for testing and debugging purposes. Default is True.</td>
226 </tr>
227 <tr class="field"><th class="field-name" colspan="2">convert.cvsps.fuzz:</th></tr>
228 <tr class="field"><td>&nbsp;</td><td class="field-body">Specify the maximum time (in seconds) that is
229 allowed between commits with identical user and log message in
230 a single changeset. When very large files were checked in as
231 part of a changeset then the default may not be long enough.
232 The default is 60.</td>
233 </tr>
234 <tr class="field"><th class="field-name" colspan="2">convert.cvsps.logencoding:</th></tr>
235 <tr class="field"><td>&nbsp;</td><td class="field-body">Specify encoding name to be used for
236 transcoding CVS log messages. Multiple encoding names can be
237 specified as a list (see <a class="reference external" href="hgrc.5.html#Syntax"><tt class="docutils literal">hg help config.Syntax</tt></a>), but only
238 the first acceptable encoding in the list is used per CVS log
239 entries. This transcoding is executed before cvslog hook below.</td>
240 </tr>
241 <tr class="field"><th class="field-name" colspan="2">convert.cvsps.mergeto:</th></tr>
242 <tr class="field"><td>&nbsp;</td><td class="field-body">Specify a regular expression to which
243 commit log messages are matched. If a match occurs, then the
244 conversion process will insert a dummy revision merging the
245 branch on which this log message occurs to the branch
246 indicated in the regex. Default is <tt class="docutils literal">{{mergetobranch
247 <span class="pre">([-\w]+)}}</span></tt></td>
248 </tr>
249 <tr class="field"><th class="field-name" colspan="2">convert.cvsps.mergefrom:</th></tr>
250 <tr class="field"><td>&nbsp;</td><td class="field-body">Specify a regular expression to which
251 commit log messages are matched. If a match occurs, then the
252 conversion process will add the most recent revision on the
253 branch indicated in the regex as the second parent of the
254 changeset. Default is <tt class="docutils literal">{{mergefrombranch <span class="pre">([-\w]+)}}</span></tt></td>
255 </tr>
256 <tr class="field"><th class="field-name" colspan="2">convert.localtimezone:</th></tr>
257 <tr class="field"><td>&nbsp;</td><td class="field-body">use local time (as determined by the TZ
258 environment variable) for changeset date/times. The default
259 is False (use UTC).</td>
260 </tr>
261 <tr class="field"><th class="field-name">hooks.cvslog:</th><td class="field-body">Specify a Python function to be called at the end of
262 gathering the CVS log. The function is passed a list with the
263 log entries, and can modify the entries in-place, or add or
264 delete them.</td>
265 </tr>
266 <tr class="field"><th class="field-name" colspan="2">hooks.cvschangesets:</th></tr>
267 <tr class="field"><td>&nbsp;</td><td class="field-body">Specify a Python function to be called after
268 the changesets are calculated from the CVS log. The
269 function is passed a list with the changeset entries, and can
270 modify the changesets in-place, or add or delete them.</td>
271 </tr>
272 </tbody>
273 </table>
274 <p>An additional &quot;debugcvsps&quot; Mercurial command allows the builtin
275 changeset merging code to be run without doing a conversion. Its
276 parameters and output are similar to that of cvsps 2.1. Please see
277 the command help for more details.</p>
278 </div>
279 <div class="section" id="subversion-source">
280 <h4>Subversion Source</h4>
281 <p>Subversion source detects classical trunk/branches/tags layouts.
282 By default, the supplied <tt class="docutils literal"><span class="pre">svn://repo/path/</span></tt> source URL is
283 converted as a single branch. If <tt class="docutils literal"><span class="pre">svn://repo/path/trunk</span></tt> exists
284 it replaces the default branch. If <tt class="docutils literal"><span class="pre">svn://repo/path/branches</span></tt>
285 exists, its subdirectories are listed as possible branches. If
286 <tt class="docutils literal"><span class="pre">svn://repo/path/tags</span></tt> exists, it is looked for tags referencing
287 converted branches. Default <tt class="docutils literal">trunk</tt>, <tt class="docutils literal">branches</tt> and <tt class="docutils literal">tags</tt>
288 values can be overridden with following options. Set them to paths
289 relative to the source URL, or leave them blank to disable auto
290 detection.</p>
291 <p>The following options can be set with <tt class="docutils literal"><span class="pre">--config</span></tt>:</p>
292 <table class="docutils field-list" frame="void" rules="none">
293 <col class="field-name" />
294 <col class="field-body" />
295 <tbody valign="top">
296 <tr class="field"><th class="field-name" colspan="2">convert.svn.branches:</th></tr>
297 <tr class="field"><td>&nbsp;</td><td class="field-body">specify the directory containing branches.
298 The default is <tt class="docutils literal">branches</tt>.</td>
299 </tr>
300 <tr class="field"><th class="field-name" colspan="2">convert.svn.tags:</th></tr>
301 <tr class="field"><td>&nbsp;</td><td class="field-body">specify the directory containing tags. The
302 default is <tt class="docutils literal">tags</tt>.</td>
303 </tr>
304 <tr class="field"><th class="field-name" colspan="2">convert.svn.trunk:</th></tr>
305 <tr class="field"><td>&nbsp;</td><td class="field-body">specify the name of the trunk branch. The
306 default is <tt class="docutils literal">trunk</tt>.</td>
307 </tr>
308 <tr class="field"><th class="field-name" colspan="2">convert.localtimezone:</th></tr>
309 <tr class="field"><td>&nbsp;</td><td class="field-body">use local time (as determined by the TZ
310 environment variable) for changeset date/times. The default
311 is False (use UTC).</td>
312 </tr>
313 </tbody>
314 </table>
315 <p>Source history can be retrieved starting at a specific revision,
316 instead of being integrally converted. Only single branch
317 conversions are supported.</p>
318 <table class="docutils field-list" frame="void" rules="none">
319 <col class="field-name" />
320 <col class="field-body" />
321 <tbody valign="top">
322 <tr class="field"><th class="field-name" colspan="2">convert.svn.startrev:</th></tr>
323 <tr class="field"><td>&nbsp;</td><td class="field-body">specify start Subversion revision number.
324 The default is 0.</td>
325 </tr>
326 </tbody>
327 </table>
328 </div>
329 <div class="section" id="git-source">
330 <h4>Git Source</h4>
331 <p>The Git importer converts commits from all reachable branches (refs
332 in refs/heads) and remotes (refs in refs/remotes) to Mercurial.
333 Branches are converted to bookmarks with the same name, with the
334 leading 'refs/heads' stripped. Git submodules are converted to Git
335 subrepos in Mercurial.</p>
336 <p>The following options can be set with <tt class="docutils literal"><span class="pre">--config</span></tt>:</p>
337 <table class="docutils field-list" frame="void" rules="none">
338 <col class="field-name" />
339 <col class="field-body" />
340 <tbody valign="top">
341 <tr class="field"><th class="field-name" colspan="2">convert.git.similarity:</th></tr>
342 <tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first">specify how similar files modified in a
343 commit must be to be imported as renames or copies, as a
344 percentage between <tt class="docutils literal">0</tt> (disabled) and <tt class="docutils literal">100</tt> (files must be
345 identical). For example, <tt class="docutils literal">90</tt> means that a delete/add pair will
346 be imported as a rename if more than 90% of the file hasn't
347 changed. The default is <tt class="docutils literal">50</tt>.</p>
348 </td>
349 </tr>
350 <tr class="field"><th class="field-name" colspan="2">convert.git.findcopiesharder:</th></tr>
351 <tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first">while detecting copies, look at all
352 files in the working copy instead of just changed ones. This
353 is very expensive for large projects, and is only effective when
354 <tt class="docutils literal">convert.git.similarity</tt> is greater than 0. The default is False.</p>
355 </td>
356 </tr>
357 <tr class="field"><th class="field-name" colspan="2">convert.git.renamelimit:</th></tr>
358 <tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first">perform rename and copy detection up to this
359 many changed files in a commit. Increasing this will make rename
360 and copy detection more accurate but will significantly slow down
361 computation on large projects. The option is only relevant if
362 <tt class="docutils literal">convert.git.similarity</tt> is greater than 0. The default is
363 <tt class="docutils literal">400</tt>.</p>
364 </td>
365 </tr>
366 <tr class="field"><th class="field-name" colspan="2">convert.git.committeractions:</th></tr>
367 <tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first">list of actions to take when processing
368 author and committer values.</p>
369 <p>Git commits have separate author (who wrote the commit) and committer
370 (who applied the commit) fields. Not all destinations support separate
371 author and committer fields (including Mercurial). This config option
372 controls what to do with these author and committer fields during
373 conversion.</p>
374 <p>A value of <tt class="docutils literal">messagedifferent</tt> will append a <tt class="docutils literal">committer: ...</tt>
375 line to the commit message if the Git committer is different from the
376 author. The prefix of that line can be specified using the syntax
377 <tt class="docutils literal"><span class="pre">messagedifferent=&lt;prefix&gt;</span></tt>. e.g. <tt class="docutils literal"><span class="pre">messagedifferent=git-committer:</span></tt>.
378 When a prefix is specified, a space will always be inserted between the
379 prefix and the value.</p>
380 <p><tt class="docutils literal">messagealways</tt> behaves like <tt class="docutils literal">messagedifferent</tt> except it will
381 always result in a <tt class="docutils literal">committer: ...</tt> line being appended to the commit
382 message. This value is mutually exclusive with <tt class="docutils literal">messagedifferent</tt>.</p>
383 <p><tt class="docutils literal">dropcommitter</tt> will remove references to the committer. Only
384 references to the author will remain. Actions that add references
385 to the committer will have no effect when this is set.</p>
386 <p><tt class="docutils literal">replaceauthor</tt> will replace the value of the author field with
387 the committer. Other actions that add references to the committer
388 will still take effect when this is set.</p>
389 <p>The default is <tt class="docutils literal">messagedifferent</tt>.</p>
390 </td>
391 </tr>
392 <tr class="field"><th class="field-name" colspan="2">convert.git.extrakeys:</th></tr>
393 <tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first">list of extra keys from commit metadata to copy to
394 the destination. Some Git repositories store extra metadata in commits.
395 By default, this non-default metadata will be lost during conversion.
396 Setting this config option can retain that metadata. Some built-in
397 keys such as <tt class="docutils literal">parent</tt> and <tt class="docutils literal">branch</tt> are not allowed to be copied.</p>
398 </td>
399 </tr>
400 <tr class="field"><th class="field-name" colspan="2">convert.git.remoteprefix:</th></tr>
401 <tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first">remote refs are converted as bookmarks with
402 <tt class="docutils literal">convert.git.remoteprefix</tt> as a prefix followed by a /. The default
403 is 'remote'.</p>
404 </td>
405 </tr>
406 <tr class="field"><th class="field-name" colspan="2">convert.git.saverev:</th></tr>
407 <tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first">whether to store the original Git commit ID in the
408 metadata of the destination commit. The default is True.</p>
409 </td>
410 </tr>
411 <tr class="field"><th class="field-name" colspan="2">convert.git.skipsubmodules:</th></tr>
412 <tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first last">does not convert root level .gitmodules files
413 or files with 160000 mode indicating a submodule. Default is False.</p>
414 </td>
415 </tr>
416 </tbody>
417 </table>
418 </div>
419 <div class="section" id="perforce-source">
420 <h4>Perforce Source</h4>
421 <p>The Perforce (P4) importer can be given a p4 depot path or a
422 client specification as source. It will convert all files in the
423 source to a flat Mercurial repository, ignoring labels, branches
424 and integrations. Note that when a depot path is given you then
425 usually should specify a target directory, because otherwise the
426 target may be named <tt class="docutils literal"><span class="pre">...-hg</span></tt>.</p>
427 <p>The following options can be set with <tt class="docutils literal"><span class="pre">--config</span></tt>:</p>
428 <table class="docutils field-list" frame="void" rules="none">
429 <col class="field-name" />
430 <col class="field-body" />
431 <tbody valign="top">
432 <tr class="field"><th class="field-name" colspan="2">convert.p4.encoding:</th></tr>
433 <tr class="field"><td>&nbsp;</td><td class="field-body">specify the encoding to use when decoding standard
434 output of the Perforce command line tool. The default is default system
435 encoding.</td>
436 </tr>
437 <tr class="field"><th class="field-name" colspan="2">convert.p4.startrev:</th></tr>
438 <tr class="field"><td>&nbsp;</td><td class="field-body">specify initial Perforce revision (a
439 Perforce changelist number).</td>
440 </tr>
441 </tbody>
442 </table>
443 </div>
444 <div class="section" id="mercurial-destination">
445 <h4>Mercurial Destination</h4>
446 <p>The Mercurial destination will recognize Mercurial subrepositories in the
447 destination directory, and update the .hgsubstate file automatically if the
448 destination subrepositories contain the &lt;dest&gt;/&lt;sub&gt;/.hg/shamap file.
449 Converting a repository with subrepositories requires converting a single
450 repository at a time, from the bottom up.</p>
451 <div class="verbose docutils container">
452 <p>An example showing how to convert a repository with subrepositories:</p>
453 <pre class="literal-block">
454 # so convert knows the type when it sees a non empty destination
455 $ hg init converted
456
457 $ hg convert orig/sub1 converted/sub1
458 $ hg convert orig/sub2 converted/sub2
459 $ hg convert orig converted
460 </pre>
461 </div>
462 <p>The following options are supported:</p>
463 <table class="docutils field-list" frame="void" rules="none">
464 <col class="field-name" />
465 <col class="field-body" />
466 <tbody valign="top">
467 <tr class="field"><th class="field-name" colspan="2">convert.hg.clonebranches:</th></tr>
468 <tr class="field"><td>&nbsp;</td><td class="field-body">dispatch source branches in separate
469 clones. The default is False.</td>
470 </tr>
471 <tr class="field"><th class="field-name" colspan="2">convert.hg.tagsbranch:</th></tr>
472 <tr class="field"><td>&nbsp;</td><td class="field-body">branch name for tag revisions, defaults to
473 <tt class="docutils literal">default</tt>.</td>
474 </tr>
475 <tr class="field"><th class="field-name" colspan="2">convert.hg.usebranchnames:</th></tr>
476 <tr class="field"><td>&nbsp;</td><td class="field-body">preserve branch names. The default is
477 True.</td>
478 </tr>
479 <tr class="field"><th class="field-name" colspan="2">convert.hg.sourcename:</th></tr>
480 <tr class="field"><td>&nbsp;</td><td class="field-body">records the given string as a 'convert_source' extra
481 value on each commit made in the target repository. The default is None.</td>
482 </tr>
483 <tr class="field"><th class="field-name" colspan="2">convert.hg.preserve-hash:</th></tr>
484 <tr class="field"><td>&nbsp;</td><td class="field-body">only works with mercurial sources. Make convert
485 prevent performance improvement to the list of modified files in commits
486 when such an improvement would cause the hash of a commit to change.
487 The default is False.</td>
488 </tr>
489 </tbody>
490 </table>
491 </div>
492 <div class="section" id="all-destinations">
493 <h4>All Destinations</h4>
494 <p>All destination types accept the following options:</p>
495 <table class="docutils field-list" frame="void" rules="none">
496 <col class="field-name" />
497 <col class="field-body" />
498 <tbody valign="top">
499 <tr class="field"><th class="field-name" colspan="2">convert.skiptags:</th></tr>
500 <tr class="field"><td>&nbsp;</td><td class="field-body">does not convert tags from the source repo to the target
501 repo. The default is False.</td>
502 </tr>
503 </tbody>
504 </table>
505 </div>
506 <div class="section" id="subversion-destination">
507 <h4>Subversion Destination</h4>
508 <p>Original commit dates are not preserved by default.</p>
509 <table class="docutils field-list" frame="void" rules="none">
510 <col class="field-name" />
511 <col class="field-body" />
512 <tbody valign="top">
513 <tr class="field"><th class="field-name" colspan="2">convert.svn.dangerous-set-commit-dates:</th></tr>
514 <tr class="field"><td>&nbsp;</td><td class="field-body">preserve original commit dates,
515 forcefully setting <tt class="docutils literal">svn:date</tt> revision properties. This option is
516 DANGEROUS and may break some subversion functionality for the resulting
517 repository (e.g. filtering revisions with date ranges in <tt class="docutils literal">svn log</tt>),
518 as original commit dates are not guaranteed to be monotonically
519 increasing.</td>
520 </tr>
521 </tbody>
522 </table>
523 <p>For commit dates setting to work destination repository must have
524 <tt class="docutils literal"><span class="pre">pre-revprop-change</span></tt> hook configured to allow setting of <tt class="docutils literal">svn:date</tt>
525 revision properties. See Subversion documentation for more details.</p>
526 <p>Options:</p>
527 <table class="docutils option-list" frame="void" rules="none">
528 <col class="option" />
529 <col class="description" />
530 <tbody valign="top">
531 <tr><td class="option-group" colspan="2">
532 <kbd><span class="option">--authors <var>&lt;FILE&gt;</var></span></kbd></td>
533 </tr>
534 <tr><td>&nbsp;</td><td>username mapping filename (DEPRECATED) (use --authormap instead)</td></tr>
535 <tr><td class="option-group" colspan="2">
536 <kbd><span class="option">-s</span>, <span class="option">--source-type <var>&lt;TYPE&gt;</var></span></kbd></td>
537 </tr>
538 <tr><td>&nbsp;</td><td>source repository type</td></tr>
539 <tr><td class="option-group" colspan="2">
540 <kbd><span class="option">-d</span>, <span class="option">--dest-type <var>&lt;TYPE&gt;</var></span></kbd></td>
541 </tr>
542 <tr><td>&nbsp;</td><td>destination repository type</td></tr>
543 <tr><td class="option-group" colspan="2">
544 <kbd><span class="option">-r</span>, <span class="option">--rev <var>&lt;REV[+]&gt;</var></span></kbd></td>
545 </tr>
546 <tr><td>&nbsp;</td><td>import up to source revision REV</td></tr>
547 <tr><td class="option-group" colspan="2">
548 <kbd><span class="option">-A</span>, <span class="option">--authormap <var>&lt;FILE&gt;</var></span></kbd></td>
549 </tr>
550 <tr><td>&nbsp;</td><td>remap usernames using this file</td></tr>
551 <tr><td class="option-group" colspan="2">
552 <kbd><span class="option">--filemap <var>&lt;FILE&gt;</var></span></kbd></td>
553 </tr>
554 <tr><td>&nbsp;</td><td>remap file names using contents of file</td></tr>
555 <tr><td class="option-group">
556 <kbd><span class="option">--full</span></kbd></td>
557 <td>apply filemap changes by converting all files again</td></tr>
558 <tr><td class="option-group" colspan="2">
559 <kbd><span class="option">--splicemap <var>&lt;FILE&gt;</var></span></kbd></td>
560 </tr>
561 <tr><td>&nbsp;</td><td>splice synthesized history into place</td></tr>
562 <tr><td class="option-group" colspan="2">
563 <kbd><span class="option">--branchmap <var>&lt;FILE&gt;</var></span></kbd></td>
564 </tr>
565 <tr><td>&nbsp;</td><td>change branch names while converting</td></tr>
566 <tr><td class="option-group">
567 <kbd><span class="option">--branchsort</span></kbd></td>
568 <td>try to sort changesets by branches</td></tr>
569 <tr><td class="option-group">
570 <kbd><span class="option">--datesort</span></kbd></td>
571 <td>try to sort changesets by date</td></tr>
572 <tr><td class="option-group">
573 <kbd><span class="option">--sourcesort</span></kbd></td>
574 <td>preserve source changesets order</td></tr>
575 <tr><td class="option-group">
576 <kbd><span class="option">--closesort</span></kbd></td>
577 <td>try to reorder closed revisions</td></tr>
578 </tbody>
579 </table>
580 <p>[+] marked option can be specified multiple times</p>
581 </div>
582 </div>
583 </div>
584 </div>
585 </div>
586 </body>
587 </html>