Mercurial > hg
annotate tests/test-convert.t @ 52192:54be3c9bc81f stable
tests: conditionalize missing output in test-racy-mutations.t on Windows
No idea why this is only missing on Windows. I verified that the line marked
as missing directly above this for the changelog is, in fact, missing on both
Windows and Linux. So there's probably work to do in this area on all
platforms. It would be nice to figure out what is going on, but this appeases
CI in the meantime.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 05 Nov 2024 11:48:22 -0500 |
parents | 19ae7730636a |
children |
rev | line source |
---|---|
12510 | 1 $ cat >> $HGRCPATH <<EOF |
2 > [extensions] | |
3 > convert= | |
4 > [convert] | |
5 > hg.saverev=False | |
6 > EOF | |
7 $ hg help convert | |
8 hg convert [OPTION]... SOURCE [DEST [REVMAP]] | |
9 | |
10 convert a foreign SCM repository to a Mercurial one. | |
11 | |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
12 Accepted source formats [identifiers]: |
12510 | 13 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
14 - Mercurial [hg] |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
15 - CVS [cvs] |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
16 - Darcs [darcs] |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
17 - git [git] |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
18 - Subversion [svn] |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
19 - Monotone [mtn] |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
20 - GNU Arch [gnuarch] |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
21 - Bazaar [bzr] |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
22 - Perforce [p4] |
12510 | 23 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
24 Accepted destination formats [identifiers]: |
12510 | 25 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
26 - Mercurial [hg] |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
27 - Subversion [svn] (history on branches is not preserved) |
12510 | 28 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
29 If no revision is given, all revisions will be converted. Otherwise, convert |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
30 will only import up to the named revision (given in a format understood by the |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
31 source). |
12510 | 32 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
33 If no destination directory name is specified, it defaults to the basename of |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
34 the source with "-hg" appended. If the destination repository doesn't exist, |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
35 it will be created. |
12510 | 36 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
37 By default, all sources except Mercurial will use --branchsort. Mercurial uses |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
38 --sourcesort to preserve original revision numbers order. Sort modes have the |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
39 following effects: |
12510 | 40 |
41 --branchsort convert from parent to child revision when possible, which | |
13011
4936a04b6792
minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents:
12924
diff
changeset
|
42 means branches are usually converted one after the other. |
4936a04b6792
minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents:
12924
diff
changeset
|
43 It generates more compact repositories. |
12510 | 44 --datesort sort revisions by date. Converted repositories have good- |
45 looking changelogs but are often an order of magnitude | |
46 larger than the same ones generated by --branchsort. | |
47 --sourcesort try to preserve source revisions order, only supported by | |
48 Mercurial sources. | |
18819
05acdf8e1f23
convert: add closesort algorithm to mercurial sources
Constantine Linnick <theaspect@gmail.com>
parents:
18324
diff
changeset
|
49 --closesort try to move closed revisions as close as possible to parent |
05acdf8e1f23
convert: add closesort algorithm to mercurial sources
Constantine Linnick <theaspect@gmail.com>
parents:
18324
diff
changeset
|
50 branches, only supported by Mercurial sources. |
12510 | 51 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
52 If "REVMAP" isn't given, it will be put in a default location |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
53 ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that maps |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
54 each source commit ID to the destination ID for that revision, like so: |
12510 | 55 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
56 <source ID> <destination ID> |
12510 | 57 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
58 If the file doesn't exist, it's automatically created. It's updated on each |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
59 commit copied, so 'hg convert' can be interrupted and can be run repeatedly to |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
60 copy new commits. |
12510 | 61 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
62 The authormap is a simple text file that maps each source commit author to a |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
63 destination commit author. It is handy for source SCMs that use unix logins to |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
64 identify authors (e.g.: CVS). One line per author mapping and the line format |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
65 is: |
12510 | 66 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
67 source author = destination author |
12510 | 68 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
69 Empty lines and lines starting with a "#" are ignored. |
12510 | 70 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
71 The filemap is a file that allows filtering and remapping of files and |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
72 directories. Each line can contain one of the following directives: |
12510 | 73 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
74 include path/to/file-or-dir |
12510 | 75 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
76 exclude path/to/file-or-dir |
12510 | 77 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
78 rename path/to/source path/to/destination |
12510 | 79 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
80 Comment lines start with "#". A specified path matches if it equals the full |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
81 relative name of a file or one of its parent directories. The "include" or |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
82 "exclude" directive with the longest matching path applies, so line order does |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
83 not matter. |
12510 | 84 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
85 The "include" directive causes a file, or all files under a directory, to be |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
86 included in the destination repository. The default if there are no "include" |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
87 statements is to include everything. If there are any "include" statements, |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
88 nothing else is included. The "exclude" directive causes files or directories |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
89 to be omitted. The "rename" directive renames a file or directory if it is |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
90 converted. To rename from a subdirectory into the root of the repository, use |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
91 "." as the path to rename to. |
12510 | 92 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
93 "--full" will make sure the converted changesets contain exactly the right |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
94 files with the right content. It will make a full conversion of all files, not |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
95 just the ones that have changed. Files that already are correct will not be |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
96 changed. This can be used to apply filemap changes when converting |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
97 incrementally. This is currently only supported for Mercurial and Subversion. |
22300
35ab037de989
convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents:
22110
diff
changeset
|
98 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
99 The splicemap is a file that allows insertion of synthetic history, letting |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
100 you specify the parents of a revision. This is useful if you want to e.g. give |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
101 a Subversion merge two parents, or graft two disconnected series of history |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
102 together. Each entry contains a key, followed by a space, followed by one or |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
103 two comma-separated values: |
12510 | 104 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
105 key parent1, parent2 |
12510 | 106 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
107 The key is the revision ID in the source revision control system whose parents |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
108 should be modified (same format as a key in .hg/shamap). The values are the |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
109 revision IDs (in either the source or destination revision control system) |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
110 that should be used as the new parents for that node. For example, if you have |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
111 merged "release-1.0" into "trunk", then you should specify the revision on |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
112 "trunk" as the first parent and the one on the "release-1.0" branch as the |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
113 second. |
12510 | 114 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
115 The branchmap is a file that allows you to rename a branch when it is being |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
116 brought in from whatever external repository. When used in conjunction with a |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
117 splicemap, it allows for a powerful combination to help fix even the most |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
118 badly mismanaged repositories and turn them into nicely structured Mercurial |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
119 repositories. The branchmap contains lines of the form: |
12510 | 120 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
121 original_branch_name new_branch_name |
12510 | 122 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
123 where "original_branch_name" is the name of the branch in the source |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
124 repository, and "new_branch_name" is the name of the branch is the destination |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
125 repository. No whitespace is allowed in the new branch name. This can be used |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
126 to (for instance) move code in one repository from "default" to a named |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
127 branch. |
12510 | 128 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
129 Mercurial Source |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
130 ################ |
12510 | 131 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
132 The Mercurial source recognizes the following configuration options, which you |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
133 can set on the command line with "--config": |
12510 | 134 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
135 convert.hg.ignoreerrors |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
136 ignore integrity errors when reading. Use it to fix Mercurial |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
137 repositories with missing revlogs, by converting from and to |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
138 Mercurial. Default is False. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
139 convert.hg.saverev |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
140 store original revision ID in changeset (forces target IDs to |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
141 change). It takes a boolean argument and defaults to False. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
142 convert.hg.startrev |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
143 specify the initial Mercurial revision. The default is 0. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
144 convert.hg.revs |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
145 revset specifying the source revisions to convert. |
12510 | 146 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
147 Bazaar Source |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
148 ############# |
38572
85da230c316a
convert: add a config knob for not saving the bzr revision
Matt Harbison <matt_harbison@yahoo.com>
parents:
38250
diff
changeset
|
149 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
150 The following options can be used with "--config": |
38572
85da230c316a
convert: add a config knob for not saving the bzr revision
Matt Harbison <matt_harbison@yahoo.com>
parents:
38250
diff
changeset
|
151 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
152 convert.bzr.saverev |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
153 whether to store the original Bazaar commit ID in the metadata |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
154 of the destination commit. The default is True. |
38572
85da230c316a
convert: add a config knob for not saving the bzr revision
Matt Harbison <matt_harbison@yahoo.com>
parents:
38250
diff
changeset
|
155 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
156 CVS Source |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
157 ########## |
12510 | 158 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
159 CVS source will use a sandbox (i.e. a checked-out copy) from CVS to indicate |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
160 the starting point of what will be converted. Direct access to the repository |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
161 files is not needed, unless of course the repository is ":local:". The |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
162 conversion uses the top level directory in the sandbox to find the CVS |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
163 repository, and then uses CVS rlog commands to find files to convert. This |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
164 means that unless a filemap is given, all files under the starting directory |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
165 will be converted, and that any directory reorganization in the CVS sandbox is |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
166 ignored. |
12510 | 167 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
168 The following options can be used with "--config": |
12510 | 169 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
170 convert.cvsps.cache |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
171 Set to False to disable remote log caching, for testing and |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
172 debugging purposes. Default is True. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
173 convert.cvsps.fuzz |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
174 Specify the maximum time (in seconds) that is allowed between |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
175 commits with identical user and log message in a single |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
176 changeset. When very large files were checked in as part of a |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
177 changeset then the default may not be long enough. The default |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
178 is 60. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
179 convert.cvsps.logencoding |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
180 Specify encoding name to be used for transcoding CVS log |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
181 messages. Multiple encoding names can be specified as a list |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
182 (see 'hg help config.Syntax'), but only the first acceptable |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
183 encoding in the list is used per CVS log entries. This |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
184 transcoding is executed before cvslog hook below. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
185 convert.cvsps.mergeto |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
186 Specify a regular expression to which commit log messages are |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
187 matched. If a match occurs, then the conversion process will |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
188 insert a dummy revision merging the branch on which this log |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
189 message occurs to the branch indicated in the regex. Default is |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
190 "{{mergetobranch ([-\w]+)}}" |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
191 convert.cvsps.mergefrom |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
192 Specify a regular expression to which commit log messages are |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
193 matched. If a match occurs, then the conversion process will add |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
194 the most recent revision on the branch indicated in the regex as |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
195 the second parent of the changeset. Default is |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
196 "{{mergefrombranch ([-\w]+)}}" |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
197 convert.localtimezone |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
198 use local time (as determined by the TZ environment variable) |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
199 for changeset date/times. The default is False (use UTC). |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
200 hooks.cvslog Specify a Python function to be called at the end of gathering |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
201 the CVS log. The function is passed a list with the log entries, |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
202 and can modify the entries in-place, or add or delete them. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
203 hooks.cvschangesets |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
204 Specify a Python function to be called after the changesets are |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
205 calculated from the CVS log. The function is passed a list with |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
206 the changeset entries, and can modify the changesets in-place, |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
207 or add or delete them. |
12510 | 208 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
209 An additional "debugcvsps" Mercurial command allows the builtin changeset |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
210 merging code to be run without doing a conversion. Its parameters and output |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
211 are similar to that of cvsps 2.1. Please see the command help for more |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
212 details. |
12510 | 213 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
214 Subversion Source |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
215 ################# |
12510 | 216 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
217 Subversion source detects classical trunk/branches/tags layouts. By default, |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
218 the supplied "svn://repo/path/" source URL is converted as a single branch. If |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
219 "svn://repo/path/trunk" exists it replaces the default branch. If |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
220 "svn://repo/path/branches" exists, its subdirectories are listed as possible |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
221 branches. If "svn://repo/path/tags" exists, it is looked for tags referencing |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
222 converted branches. Default "trunk", "branches" and "tags" values can be |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
223 overridden with following options. Set them to paths relative to the source |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
224 URL, or leave them blank to disable auto detection. |
12510 | 225 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
226 The following options can be set with "--config": |
12510 | 227 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
228 convert.svn.branches |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
229 specify the directory containing branches. The default is |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
230 "branches". |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
231 convert.svn.tags |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
232 specify the directory containing tags. The default is "tags". |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
233 convert.svn.trunk |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
234 specify the name of the trunk branch. The default is "trunk". |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
235 convert.localtimezone |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
236 use local time (as determined by the TZ environment variable) |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
237 for changeset date/times. The default is False (use UTC). |
12510 | 238 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
239 Source history can be retrieved starting at a specific revision, instead of |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
240 being integrally converted. Only single branch conversions are supported. |
12510 | 241 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
242 convert.svn.startrev |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
243 specify start Subversion revision number. The default is 0. |
12510 | 244 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
245 Git Source |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
246 ########## |
22466
e1b68c0a9363
convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com>
parents:
22300
diff
changeset
|
247 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
248 The Git importer converts commits from all reachable branches (refs in |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
249 refs/heads) and remotes (refs in refs/remotes) to Mercurial. Branches are |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
250 converted to bookmarks with the same name, with the leading 'refs/heads' |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
251 stripped. Git submodules are converted to Git subrepos in Mercurial. |
22466
e1b68c0a9363
convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com>
parents:
22300
diff
changeset
|
252 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
253 The following options can be set with "--config": |
22470
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
254 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
255 convert.git.similarity |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
256 specify how similar files modified in a commit must be to be |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
257 imported as renames or copies, as a percentage between "0" |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
258 (disabled) and "100" (files must be identical). For example, |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
259 "90" means that a delete/add pair will be imported as a rename |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
260 if more than 90% of the file hasn't changed. The default is |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
261 "50". |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
262 convert.git.findcopiesharder |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
263 while detecting copies, look at all files in the working copy |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
264 instead of just changed ones. This is very expensive for large |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
265 projects, and is only effective when "convert.git.similarity" is |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
266 greater than 0. The default is False. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
267 convert.git.renamelimit |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
268 perform rename and copy detection up to this many changed files |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
269 in a commit. Increasing this will make rename and copy detection |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
270 more accurate but will significantly slow down computation on |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
271 large projects. The option is only relevant if |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
272 "convert.git.similarity" is greater than 0. The default is |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
273 "400". |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
274 convert.git.committeractions |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
275 list of actions to take when processing author and committer |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
276 values. |
30813
2cbbd4622ab0
convert: config option to control Git committer actions
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30661
diff
changeset
|
277 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
278 Git commits have separate author (who wrote the commit) and committer (who |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
279 applied the commit) fields. Not all destinations support separate author |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
280 and committer fields (including Mercurial). This config option controls |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
281 what to do with these author and committer fields during conversion. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
282 |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
283 A value of "messagedifferent" will append a "committer: ..." line to the |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
284 commit message if the Git committer is different from the author. The |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
285 prefix of that line can be specified using the syntax |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
286 "messagedifferent=<prefix>". e.g. "messagedifferent=git-committer:". When |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
287 a prefix is specified, a space will always be inserted between the prefix |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
288 and the value. |
30813
2cbbd4622ab0
convert: config option to control Git committer actions
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30661
diff
changeset
|
289 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
290 "messagealways" behaves like "messagedifferent" except it will always |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
291 result in a "committer: ..." line being appended to the commit message. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
292 This value is mutually exclusive with "messagedifferent". |
30813
2cbbd4622ab0
convert: config option to control Git committer actions
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30661
diff
changeset
|
293 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
294 "dropcommitter" will remove references to the committer. Only references |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
295 to the author will remain. Actions that add references to the committer |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
296 will have no effect when this is set. |
30813
2cbbd4622ab0
convert: config option to control Git committer actions
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30661
diff
changeset
|
297 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
298 "replaceauthor" will replace the value of the author field with the |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
299 committer. Other actions that add references to the committer will still |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
300 take effect when this is set. |
30813
2cbbd4622ab0
convert: config option to control Git committer actions
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30661
diff
changeset
|
301 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
302 The default is "messagedifferent". |
30813
2cbbd4622ab0
convert: config option to control Git committer actions
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30661
diff
changeset
|
303 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
304 convert.git.extrakeys |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
305 list of extra keys from commit metadata to copy to the |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
306 destination. Some Git repositories store extra metadata in |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
307 commits. By default, this non-default metadata will be lost |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
308 during conversion. Setting this config option can retain that |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
309 metadata. Some built-in keys such as "parent" and "branch" are |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
310 not allowed to be copied. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
311 convert.git.remoteprefix |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
312 remote refs are converted as bookmarks with |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
313 "convert.git.remoteprefix" as a prefix followed by a /. The |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
314 default is 'remote'. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
315 convert.git.saverev |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
316 whether to store the original Git commit ID in the metadata of |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
317 the destination commit. The default is True. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
318 convert.git.skipsubmodules |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
319 does not convert root level .gitmodules files or files with |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
320 160000 mode indicating a submodule. Default is False. |
22470
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
321 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
322 Perforce Source |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
323 ############### |
12510 | 324 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
325 The Perforce (P4) importer can be given a p4 depot path or a client |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
326 specification as source. It will convert all files in the source to a flat |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
327 Mercurial repository, ignoring labels, branches and integrations. Note that |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
328 when a depot path is given you then usually should specify a target directory, |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
329 because otherwise the target may be named "...-hg". |
12510 | 330 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
331 The following options can be set with "--config": |
12510 | 332 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
333 convert.p4.encoding |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
334 specify the encoding to use when decoding standard output of the |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
335 Perforce command line tool. The default is default system |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
336 encoding. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
337 convert.p4.startrev |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
338 specify initial Perforce revision (a Perforce changelist |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
339 number). |
12510 | 340 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
341 Mercurial Destination |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
342 ##################### |
12510 | 343 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
344 The Mercurial destination will recognize Mercurial subrepositories in the |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
345 destination directory, and update the .hgsubstate file automatically if the |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
346 destination subrepositories contain the <dest>/<sub>/.hg/shamap file. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
347 Converting a repository with subrepositories requires converting a single |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
348 repository at a time, from the bottom up. |
25558
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
22512
diff
changeset
|
349 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
350 The following options are supported: |
12510 | 351 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
352 convert.hg.clonebranches |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
353 dispatch source branches in separate clones. The default is |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
354 False. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
355 convert.hg.tagsbranch |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
356 branch name for tag revisions, defaults to "default". |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
357 convert.hg.usebranchnames |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
358 preserve branch names. The default is True. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
359 convert.hg.sourcename |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
360 records the given string as a 'convert_source' extra value on |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
361 each commit made in the target repository. The default is None. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
362 convert.hg.preserve-hash |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
363 only works with mercurial sources. Make convert prevent |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
364 performance improvement to the list of modified files in commits |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
365 when such an improvement would cause the hash of a commit to |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
366 change. The default is False. |
12510 | 367 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
368 All Destinations |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
369 ################ |
25741
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
370 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
371 All destination types accept the following options: |
25741
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
372 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
373 convert.skiptags |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
374 does not convert tags from the source repo to the target repo. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
375 The default is False. |
25741
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
376 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
377 Subversion Destination |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
378 ###################### |
46400
7525e77b5eac
convert: option to set date and time for svn commits
Nikita Slyusarev <nslus@yandex-team.com>
parents:
42620
diff
changeset
|
379 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
380 Original commit dates are not preserved by default. |
46400
7525e77b5eac
convert: option to set date and time for svn commits
Nikita Slyusarev <nslus@yandex-team.com>
parents:
42620
diff
changeset
|
381 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
382 convert.svn.dangerous-set-commit-dates |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
383 preserve original commit dates, forcefully setting "svn:date" |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
384 revision properties. This option is DANGEROUS and may break some |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
385 subversion functionality for the resulting repository (e.g. |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
386 filtering revisions with date ranges in "svn log"), as original |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
387 commit dates are not guaranteed to be monotonically increasing. |
46400
7525e77b5eac
convert: option to set date and time for svn commits
Nikita Slyusarev <nslus@yandex-team.com>
parents:
42620
diff
changeset
|
388 |
52100
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
389 For commit dates setting to work destination repository must have "pre- |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
390 revprop-change" hook configured to allow setting of "svn:date" revision |
19ae7730636a
branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
52098
diff
changeset
|
391 properties. See Subversion documentation for more details. |
46400
7525e77b5eac
convert: option to set date and time for svn commits
Nikita Slyusarev <nslus@yandex-team.com>
parents:
42620
diff
changeset
|
392 |
25748
baea47cafe75
convert: add support for specifying multiple revs
Durham Goode <durham@fb.com>
parents:
25741
diff
changeset
|
393 options ([+] can be repeated): |
12510 | 394 |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
395 -s --source-type TYPE source repository type |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
396 -d --dest-type TYPE destination repository type |
25748
baea47cafe75
convert: add support for specifying multiple revs
Durham Goode <durham@fb.com>
parents:
25741
diff
changeset
|
397 -r --rev REV [+] import up to source revision REV |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
398 -A --authormap FILE remap usernames using this file |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
399 --filemap FILE remap file names using contents of file |
30152
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
400 --full apply filemap changes by converting all files again |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
401 --splicemap FILE splice synthesized history into place |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
402 --branchmap FILE change branch names while converting |
30152
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
403 --branchsort try to sort changesets by branches |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
404 --datesort try to sort changesets by date |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
405 --sourcesort preserve source changesets order |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
406 --closesort try to reorder closed revisions |
12510 | 407 |
22110
26f7c8033bed
help: tweak --verbose command help hint
Matt Mackall <mpm@selenic.com>
parents:
21077
diff
changeset
|
408 (some details hidden, use --verbose to show complete help) |
12510 | 409 $ hg init a |
410 $ cd a | |
411 $ echo a > a | |
412 $ hg ci -d'0 0' -Ama | |
413 adding a | |
414 $ hg cp a b | |
415 $ hg ci -d'1 0' -mb | |
416 $ hg rm a | |
417 $ hg ci -d'2 0' -mc | |
418 $ hg mv b a | |
419 $ hg ci -d'3 0' -md | |
420 $ echo a >> a | |
421 $ hg ci -d'4 0' -me | |
422 $ cd .. | |
423 $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
424 assuming destination a-hg | |
425 initializing destination a-hg repository | |
426 scanning source... | |
427 sorting... | |
428 converting... | |
429 4 a | |
430 3 b | |
431 2 c | |
432 1 d | |
433 0 e | |
434 $ hg --cwd a-hg pull ../a | |
435 pulling from ../a | |
436 searching for changes | |
437 no changes found | |
38250
d0abd7949ea3
phases: use "published" in the phase movement message
Boris Feld <boris.feld@octobus.net>
parents:
38249
diff
changeset
|
438 5 local changesets published |
7905
d596b1f2935a
convert: missing p4 tool is only slightly fatal
Mads Kiilerich <mads@kiilerich.com>
parents:
5805
diff
changeset
|
439 |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
440 conversion to existing file should fail |
12510 | 441 |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
442 $ touch bogusfile |
12510 | 443 $ hg convert a bogusfile |
444 initializing destination bogusfile repository | |
445 abort: cannot create new bundle repository | |
446 [255] | |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
447 |
20008
e54a078153f7
tests: skip tests that require not having root (issue4089)
Matt Mackall <mpm@selenic.com>
parents:
19891
diff
changeset
|
448 #if unix-permissions no-root |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
449 |
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
450 conversion to dir without permissions should fail |
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
451 |
12510 | 452 $ mkdir bogusdir |
453 $ chmod 000 bogusdir | |
454 | |
455 $ hg convert a bogusdir | |
50292
adecb1ab4a0d
tests: add a rewriting step to detect EACCES errors
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
46400
diff
changeset
|
456 abort: $EACCES$: *bogusdir* (glob) |
12510 | 457 [255] |
458 | |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
459 user permissions should succeed |
9962
a7178eccf2dc
convert: better error on invalid repository type
Patrick Mezard <pmezard@gmail.com>
parents:
8674
diff
changeset
|
460 |
12510 | 461 $ chmod 700 bogusdir |
462 $ hg convert a bogusdir | |
463 initializing destination bogusdir repository | |
464 scanning source... | |
465 sorting... | |
466 converting... | |
467 4 a | |
468 3 b | |
469 2 c | |
470 1 d | |
471 0 e | |
472 | |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
473 #endif |
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
474 |
12510 | 475 test pre and post conversion actions |
476 | |
477 $ echo 'include b' > filemap | |
478 $ hg convert --debug --filemap filemap a partialb | \ | |
479 > grep 'run hg' | |
480 run hg source pre-conversion action | |
481 run hg sink pre-conversion action | |
482 run hg sink post-conversion action | |
483 run hg source post-conversion action | |
484 | |
485 converting empty dir should fail "nicely | |
486 | |
487 $ mkdir emptydir | |
488 | |
489 override $PATH to ensure p4 not visible; use $PYTHON in case we're | |
490 running from a devel copy, not a temp installation | |
9962
a7178eccf2dc
convert: better error on invalid repository type
Patrick Mezard <pmezard@gmail.com>
parents:
8674
diff
changeset
|
491 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39189
diff
changeset
|
492 $ PATH="$BINDIR" "$PYTHON" "$BINDIR"/hg convert emptydir |
12510 | 493 assuming destination emptydir-hg |
494 initializing destination emptydir-hg repository | |
495 emptydir does not look like a CVS checkout | |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33388
diff
changeset
|
496 $TESTTMP/emptydir does not look like a Git repository |
12510 | 497 emptydir does not look like a Subversion repository |
498 emptydir is not a local Mercurial repository | |
499 emptydir does not look like a darcs repository | |
500 emptydir does not look like a monotone repository | |
501 emptydir does not look like a GNU Arch repository | |
502 emptydir does not look like a Bazaar repository | |
503 cannot find required "p4" tool | |
504 abort: emptydir: missing or unsupported repository | |
505 [255] | |
506 | |
507 convert with imaginary source type | |
508 | |
509 $ hg convert --source-type foo a a-foo | |
510 initializing destination a-foo repository | |
511 abort: foo: invalid source repository type | |
512 [255] | |
513 | |
514 convert with imaginary sink type | |
10577
d5bd1beff794
store: only add new entries to the fncache file
Adrian Buehlmann <adrian@cadifra.com>
parents:
9962
diff
changeset
|
515 |
12510 | 516 $ hg convert --dest-type foo a a-foo |
517 abort: foo: invalid destination repository type | |
518 [255] | |
519 | |
520 testing: convert must not produce duplicate entries in fncache | |
10885
9e4d120e3c32
convert/subversion: fix default URL checker prototype
Patrick Mezard <pmezard@gmail.com>
parents:
10775
diff
changeset
|
521 |
12510 | 522 $ hg convert a b |
523 initializing destination b repository | |
524 scanning source... | |
525 sorting... | |
526 converting... | |
527 4 a | |
528 3 b | |
529 2 c | |
530 1 d | |
531 0 e | |
532 | |
533 contents of fncache file: | |
534 | |
37415
c2c8962a9465
simplestore: use a custom store for the simple store repo
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37338
diff
changeset
|
535 #if repofncache |
13389
3efc99ac2ac4
tests: sort fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
13011
diff
changeset
|
536 $ cat b/.hg/store/fncache | sort |
37338
cbc4425e81b5
tests: conditionalize tests based on presence of revlogs for files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
537 data/a.i (reporevlogstore !) |
cbc4425e81b5
tests: conditionalize tests based on presence of revlogs for files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
538 data/b.i (reporevlogstore !) |
37415
c2c8962a9465
simplestore: use a custom store for the simple store repo
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37338
diff
changeset
|
539 #endif |
12510 | 540 |
541 test bogus URL | |
542 | |
39189
2dfc22620a54
tests: conditionalize out tests that msys is mangling
Matt Harbison <matt_harbison@yahoo.com>
parents:
38572
diff
changeset
|
543 #if no-msys |
12510 | 544 $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz |
545 abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository | |
546 [255] | |
39189
2dfc22620a54
tests: conditionalize out tests that msys is mangling
Matt Harbison <matt_harbison@yahoo.com>
parents:
38572
diff
changeset
|
547 #endif |
17002
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
548 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
549 test revset converted() lookup |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
550 |
17345
4f8054d3171b
check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents:
17267
diff
changeset
|
551 $ hg --config convert.hg.saverev=True convert a c |
17002
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
552 initializing destination c repository |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
553 scanning source... |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
554 sorting... |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
555 converting... |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
556 4 a |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
557 3 b |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
558 2 c |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
559 1 d |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
560 0 e |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
561 $ echo f > c/f |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
562 $ hg -R c ci -d'0 0' -Amf |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
563 adding f |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
564 created new head |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
565 $ hg -R c log -r "converted(09d945a62ce6)" |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
566 changeset: 1:98c3dd46a874 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
567 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
568 date: Thu Jan 01 00:00:01 1970 +0000 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
569 summary: b |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
570 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
571 $ hg -R c log -r "converted()" |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
572 changeset: 0:31ed57b2037c |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
573 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
574 date: Thu Jan 01 00:00:00 1970 +0000 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
575 summary: a |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
576 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
577 changeset: 1:98c3dd46a874 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
578 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
579 date: Thu Jan 01 00:00:01 1970 +0000 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
580 summary: b |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
581 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
582 changeset: 2:3b9ca06ef716 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
583 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
584 date: Thu Jan 01 00:00:02 1970 +0000 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
585 summary: c |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
586 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
587 changeset: 3:4e0debd37cf2 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
588 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
589 date: Thu Jan 01 00:00:03 1970 +0000 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
590 summary: d |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
591 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
592 changeset: 4:9de3bc9349c5 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
593 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
594 date: Thu Jan 01 00:00:04 1970 +0000 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
595 summary: e |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
596 |
25750
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
597 |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
598 test specifying a sourcename |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
599 $ echo g > a/g |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
600 $ hg -R a ci -d'0 0' -Amg |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
601 adding g |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
602 $ hg --config convert.hg.sourcename=mysource --config convert.hg.saverev=True convert a c |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
603 scanning source... |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
604 sorting... |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
605 converting... |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
606 0 g |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
607 $ hg -R c log -r tip --template '{extras % "{extra}\n"}' |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
608 branch=default |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
609 convert_revision=a3bc6100aa8ec03e00aaf271f1f50046fb432072 |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
610 convert_source=mysource |
32755
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
611 |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
612 $ cat > branchmap.txt << EOF |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
613 > old branch new_branch |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
614 > EOF |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
615 |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
616 $ hg -R a branch -q 'old branch' |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
617 $ echo gg > a/g |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
618 $ hg -R a ci -m 'branch name with spaces' |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
619 $ hg convert --branchmap branchmap.txt a d |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
620 initializing destination d repository |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
621 scanning source... |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
622 sorting... |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
623 converting... |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
624 6 a |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
625 5 b |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
626 4 c |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
627 3 d |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
628 2 e |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
629 1 g |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
630 0 branch name with spaces |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
631 |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
632 $ hg -R a branches |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
633 old branch 6:a24a66ade009 |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
634 default 5:a3bc6100aa8e (inactive) |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
635 $ hg -R d branches |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
636 new_branch 6:64ed208b732b |
3a57bfd369d4
convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com>
parents:
30815
diff
changeset
|
637 default 5:a3bc6100aa8e (inactive) |