Mercurial > hg
annotate tests/test-convert.t @ 25795:69145daacdfa
cmdutil: allow callers of cmdutil.dorecord to omit suggestion
Interactive committing under non-interactive mode shows command
suggestion, but sometimes it is meaningless.
command suggestion usability
------------ ---------- -----------
record commit
commit -i commit meaningless
qrecord qnew
qnew -i qnew meaningless
qrefersh -i qrefresh meaningless
shelve -i commit incorrect
------------ ---------- -----------
This patch allows callers of 'cmdutil.dorecord()' to omit meaningless
suggestion by passing None or so for 'cmdsuggest' argument of it.
This is a preparation for subsequent patches, which fix each
suggestion issues above.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 15 Jul 2015 03:43:16 +0900 |
parents | d9133e89d39d |
children | 6fb55c6c6562 |
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 | |
12 Accepted source formats [identifiers]: | |
13 | |
14 - Mercurial [hg] | |
15 - CVS [cvs] | |
16 - Darcs [darcs] | |
17 - git [git] | |
18 - Subversion [svn] | |
19 - Monotone [mtn] | |
20 - GNU Arch [gnuarch] | |
21 - Bazaar [bzr] | |
22 - Perforce [p4] | |
23 | |
24 Accepted destination formats [identifiers]: | |
25 | |
26 - Mercurial [hg] | |
27 - Subversion [svn] (history on branches is not preserved) | |
28 | |
29 If no revision is given, all revisions will be converted. Otherwise, | |
30 convert will only import up to the named revision (given in a format | |
31 understood by the source). | |
32 | |
33 If no destination directory name is specified, it defaults to the basename | |
34 of the source with "-hg" appended. If the destination repository doesn't | |
35 exist, it will be created. | |
36 | |
37 By default, all sources except Mercurial will use --branchsort. Mercurial | |
38 uses --sourcesort to preserve original revision numbers order. Sort modes | |
39 have the following effects: | |
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 |
12924
2f1174b2c4fa
convert: better ReST markup in docstring
Martin Geisler <mg@aragost.com>
parents:
12922
diff
changeset
|
52 If "REVMAP" isn't given, it will be put in a default location |
2f1174b2c4fa
convert: better ReST markup in docstring
Martin Geisler <mg@aragost.com>
parents:
12922
diff
changeset
|
53 ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that |
12510 | 54 maps each source commit ID to the destination ID for that revision, like |
55 so: | |
56 | |
57 <source ID> <destination ID> | |
58 | |
59 If the file doesn't exist, it's automatically created. It's updated on | |
60 each commit copied, so "hg convert" can be interrupted and can be run | |
61 repeatedly to copy new commits. | |
62 | |
63 The authormap is a simple text file that maps each source commit author to | |
64 a destination commit author. It is handy for source SCMs that use unix | |
17424
e7cfe3587ea4
fix trivial spelling errors
Mads Kiilerich <mads@kiilerich.com>
parents:
17345
diff
changeset
|
65 logins to identify authors (e.g.: CVS). One line per author mapping and |
e7cfe3587ea4
fix trivial spelling errors
Mads Kiilerich <mads@kiilerich.com>
parents:
17345
diff
changeset
|
66 the line format is: |
12510 | 67 |
68 source author = destination author | |
69 | |
70 Empty lines and lines starting with a "#" are ignored. | |
71 | |
72 The filemap is a file that allows filtering and remapping of files and | |
73 directories. Each line can contain one of the following directives: | |
74 | |
75 include path/to/file-or-dir | |
76 | |
77 exclude path/to/file-or-dir | |
78 | |
79 rename path/to/source path/to/destination | |
80 | |
81 Comment lines start with "#". A specified path matches if it equals the | |
82 full relative name of a file or one of its parent directories. The | |
83 "include" or "exclude" directive with the longest matching path applies, | |
84 so line order does not matter. | |
85 | |
86 The "include" directive causes a file, or all files under a directory, to | |
20784
7f4cf938643d
convert: more clear documentation of the 'include' default of a 'include .'
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
87 be included in the destination repository. The default if there are no |
7f4cf938643d
convert: more clear documentation of the 'include' default of a 'include .'
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
88 "include" statements is to include everything. If there are any "include" |
7f4cf938643d
convert: more clear documentation of the 'include' default of a 'include .'
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
89 statements, nothing else is included. The "exclude" directive causes files |
7f4cf938643d
convert: more clear documentation of the 'include' default of a 'include .'
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
90 or directories to be omitted. The "rename" directive renames a file or |
7f4cf938643d
convert: more clear documentation of the 'include' default of a 'include .'
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
91 directory if it is converted. To rename from a subdirectory into the root |
7f4cf938643d
convert: more clear documentation of the 'include' default of a 'include .'
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
92 of the repository, use "." as the path to rename to. |
12510 | 93 |
22300
35ab037de989
convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents:
22110
diff
changeset
|
94 "--full" will make sure the converted changesets contain exactly the right |
35ab037de989
convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents:
22110
diff
changeset
|
95 files with the right content. It will make a full conversion of all files, |
35ab037de989
convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents:
22110
diff
changeset
|
96 not just the ones that have changed. Files that already are correct will |
35ab037de989
convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents:
22110
diff
changeset
|
97 not be changed. This can be used to apply filemap changes when converting |
35ab037de989
convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents:
22110
diff
changeset
|
98 incrementally. This is currently only supported for Mercurial and |
35ab037de989
convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents:
22110
diff
changeset
|
99 Subversion. |
35ab037de989
convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents:
22110
diff
changeset
|
100 |
12510 | 101 The splicemap is a file that allows insertion of synthetic history, |
102 letting you specify the parents of a revision. This is useful if you want | |
103 to e.g. give a Subversion merge two parents, or graft two disconnected | |
104 series of history together. Each entry contains a key, followed by a | |
105 space, followed by one or two comma-separated values: | |
106 | |
107 key parent1, parent2 | |
108 | |
109 The key is the revision ID in the source revision control system whose | |
110 parents should be modified (same format as a key in .hg/shamap). The | |
111 values are the revision IDs (in either the source or destination revision | |
112 control system) that should be used as the new parents for that node. For | |
113 example, if you have merged "release-1.0" into "trunk", then you should | |
114 specify the revision on "trunk" as the first parent and the one on the | |
115 "release-1.0" branch as the second. | |
116 | |
117 The branchmap is a file that allows you to rename a branch when it is | |
118 being brought in from whatever external repository. When used in | |
119 conjunction with a splicemap, it allows for a powerful combination to help | |
120 fix even the most badly mismanaged repositories and turn them into nicely | |
121 structured Mercurial repositories. The branchmap contains lines of the | |
122 form: | |
123 | |
124 original_branch_name new_branch_name | |
125 | |
126 where "original_branch_name" is the name of the branch in the source | |
127 repository, and "new_branch_name" is the name of the branch is the | |
128 destination repository. No whitespace is allowed in the branch names. This | |
129 can be used to (for instance) move code in one repository from "default" | |
130 to a named branch. | |
131 | |
132 Mercurial Source | |
17267
979b107eaea2
doc: unify section level between help topics
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17251
diff
changeset
|
133 ################ |
12510 | 134 |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
135 The Mercurial source recognizes the following configuration options, which |
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
136 you can set on the command line with "--config": |
12510 | 137 |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
138 convert.hg.ignoreerrors |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
139 ignore integrity errors when reading. Use it to fix |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
140 Mercurial repositories with missing revlogs, by converting |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
141 from and to Mercurial. Default is False. |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
142 convert.hg.saverev |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
143 store original revision ID in changeset (forces target IDs |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
144 to change). It takes a boolean argument and defaults to |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
145 False. |
19891
e271970b9821
convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents:
19864
diff
changeset
|
146 convert.hg.revs |
e271970b9821
convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents:
19864
diff
changeset
|
147 revset specifying the source revisions to convert. |
12510 | 148 |
149 CVS Source | |
17267
979b107eaea2
doc: unify section level between help topics
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17251
diff
changeset
|
150 ########## |
12510 | 151 |
152 CVS source will use a sandbox (i.e. a checked-out copy) from CVS to | |
153 indicate the starting point of what will be converted. Direct access to | |
154 the repository files is not needed, unless of course the repository is | |
12924
2f1174b2c4fa
convert: better ReST markup in docstring
Martin Geisler <mg@aragost.com>
parents:
12922
diff
changeset
|
155 ":local:". The conversion uses the top level directory in the sandbox to |
12510 | 156 find the CVS repository, and then uses CVS rlog commands to find files to |
157 convert. This means that unless a filemap is given, all files under the | |
158 starting directory will be converted, and that any directory | |
159 reorganization in the CVS sandbox is ignored. | |
160 | |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
161 The following options can be used with "--config": |
12510 | 162 |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
163 convert.cvsps.cache |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
164 Set to False to disable remote log caching, for testing and |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
165 debugging purposes. Default is True. |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
166 convert.cvsps.fuzz |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
167 Specify the maximum time (in seconds) that is allowed |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
168 between commits with identical user and log message in a |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
169 single changeset. When very large files were checked in as |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
170 part of a changeset then the default may not be long enough. |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
171 The default is 60. |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
172 convert.cvsps.mergeto |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
173 Specify a regular expression to which commit log messages |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
174 are matched. If a match occurs, then the conversion process |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
175 will insert a dummy revision merging the branch on which |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
176 this log message occurs to the branch indicated in the |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
177 regex. Default is "{{mergetobranch ([-\w]+)}}" |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
178 convert.cvsps.mergefrom |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
179 Specify a regular expression to which commit log messages |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
180 are matched. If a match occurs, then the conversion process |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
181 will add the most recent revision on the branch indicated in |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
182 the regex as the second parent of the changeset. Default is |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
183 "{{mergefrombranch ([-\w]+)}}" |
17974
337d728e644f
convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents:
17837
diff
changeset
|
184 convert.localtimezone |
337d728e644f
convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents:
17837
diff
changeset
|
185 use local time (as determined by the TZ environment |
337d728e644f
convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents:
17837
diff
changeset
|
186 variable) for changeset date/times. The default is False |
337d728e644f
convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents:
17837
diff
changeset
|
187 (use UTC). |
18321
c51d2bc7a5d7
convert: correct 'hooks' section name in online help
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17837
diff
changeset
|
188 hooks.cvslog Specify a Python function to be called at the end of |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
189 gathering the CVS log. The function is passed a list with |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
190 the log entries, and can modify the entries in-place, or add |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
191 or delete them. |
18321
c51d2bc7a5d7
convert: correct 'hooks' section name in online help
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17837
diff
changeset
|
192 hooks.cvschangesets |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
193 Specify a Python function to be called after the changesets |
17251
98166640b356
help: fix some instances of 'the the'
Mads Kiilerich <mads@kiilerich.com>
parents:
17002
diff
changeset
|
194 are calculated from the CVS log. The function is passed a |
98166640b356
help: fix some instances of 'the the'
Mads Kiilerich <mads@kiilerich.com>
parents:
17002
diff
changeset
|
195 list with the changeset entries, and can modify the |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
196 changesets in-place, or add or delete them. |
12510 | 197 |
198 An additional "debugcvsps" Mercurial command allows the builtin changeset | |
199 merging code to be run without doing a conversion. Its parameters and | |
200 output are similar to that of cvsps 2.1. Please see the command help for | |
201 more details. | |
202 | |
203 Subversion Source | |
17267
979b107eaea2
doc: unify section level between help topics
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17251
diff
changeset
|
204 ################# |
12510 | 205 |
206 Subversion source detects classical trunk/branches/tags layouts. By | |
207 default, the supplied "svn://repo/path/" source URL is converted as a | |
208 single branch. If "svn://repo/path/trunk" exists it replaces the default | |
209 branch. If "svn://repo/path/branches" exists, its subdirectories are | |
210 listed as possible branches. If "svn://repo/path/tags" exists, it is | |
211 looked for tags referencing converted branches. Default "trunk", | |
212 "branches" and "tags" values can be overridden with following options. Set | |
213 them to paths relative to the source URL, or leave them blank to disable | |
214 auto detection. | |
215 | |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
216 The following options can be set with "--config": |
12510 | 217 |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
218 convert.svn.branches |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
219 specify the directory containing branches. The default is |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
220 "branches". |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
221 convert.svn.tags |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
222 specify the directory containing tags. The default is |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
223 "tags". |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
224 convert.svn.trunk |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
225 specify the name of the trunk branch. The default is |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
226 "trunk". |
17974
337d728e644f
convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents:
17837
diff
changeset
|
227 convert.localtimezone |
337d728e644f
convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents:
17837
diff
changeset
|
228 use local time (as determined by the TZ environment |
337d728e644f
convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents:
17837
diff
changeset
|
229 variable) for changeset date/times. The default is False |
337d728e644f
convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents:
17837
diff
changeset
|
230 (use UTC). |
12510 | 231 |
232 Source history can be retrieved starting at a specific revision, instead | |
233 of being integrally converted. Only single branch conversions are | |
234 supported. | |
235 | |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
236 convert.svn.startrev |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
237 specify start Subversion revision number. The default is 0. |
12510 | 238 |
22466
e1b68c0a9363
convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com>
parents:
22300
diff
changeset
|
239 Git Source |
e1b68c0a9363
convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com>
parents:
22300
diff
changeset
|
240 ########## |
e1b68c0a9363
convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com>
parents:
22300
diff
changeset
|
241 |
e1b68c0a9363
convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com>
parents:
22300
diff
changeset
|
242 The Git importer converts commits from all reachable branches (refs in |
e1b68c0a9363
convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com>
parents:
22300
diff
changeset
|
243 refs/heads) and remotes (refs in refs/remotes) to Mercurial. Branches are |
e1b68c0a9363
convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com>
parents:
22300
diff
changeset
|
244 converted to bookmarks with the same name, with the leading 'refs/heads' |
e1b68c0a9363
convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com>
parents:
22300
diff
changeset
|
245 stripped. Git submodules are converted to Git subrepos in Mercurial. |
e1b68c0a9363
convert: add initial docs for git sources
Siddharth Agarwal <sid0@fb.com>
parents:
22300
diff
changeset
|
246 |
22470
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
247 The following options can be set with "--config": |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
248 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
249 convert.git.similarity |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
250 specify how similar files modified in a commit must be to be |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
251 imported as renames or copies, as a percentage between "0" |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
252 (disabled) and "100" (files must be identical). For example, |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
253 "90" means that a delete/add pair will be imported as a |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
254 rename if more than 90% of the file hasn't changed. The |
22512
6b6da715cb96
convert: change default for git rename detection to 50%
Siddharth Agarwal <sid0@fb.com>
parents:
22471
diff
changeset
|
255 default is "50". |
22471
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
256 convert.git.findcopiesharder |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
257 while detecting copies, look at all files in the working |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
258 copy instead of just changed ones. This is very expensive |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
259 for large projects, and is only effective when |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
260 "convert.git.similarity" is greater than 0. The default is |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
261 False. |
25787
d9133e89d39d
convert: allow customizing git remote prefix
Durham Goode <durham@fb.com>
parents:
25750
diff
changeset
|
262 convert.git.remoteprefix |
d9133e89d39d
convert: allow customizing git remote prefix
Durham Goode <durham@fb.com>
parents:
25750
diff
changeset
|
263 remote refs are converted as bookmarks with |
d9133e89d39d
convert: allow customizing git remote prefix
Durham Goode <durham@fb.com>
parents:
25750
diff
changeset
|
264 "convert.git.remoteprefix" as a prefix followed by a /. The |
d9133e89d39d
convert: allow customizing git remote prefix
Durham Goode <durham@fb.com>
parents:
25750
diff
changeset
|
265 default is 'remote'. |
22470
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22466
diff
changeset
|
266 |
12510 | 267 Perforce Source |
17267
979b107eaea2
doc: unify section level between help topics
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17251
diff
changeset
|
268 ############### |
12510 | 269 |
270 The Perforce (P4) importer can be given a p4 depot path or a client | |
271 specification as source. It will convert all files in the source to a flat | |
272 Mercurial repository, ignoring labels, branches and integrations. Note | |
273 that when a depot path is given you then usually should specify a target | |
12924
2f1174b2c4fa
convert: better ReST markup in docstring
Martin Geisler <mg@aragost.com>
parents:
12922
diff
changeset
|
274 directory, because otherwise the target may be named "...-hg". |
12510 | 275 |
276 It is possible to limit the amount of source history to be converted by | |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
277 specifying an initial Perforce revision: |
12510 | 278 |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
279 convert.p4.startrev |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
280 specify initial Perforce revision (a Perforce changelist |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
281 number). |
12510 | 282 |
283 Mercurial Destination | |
17267
979b107eaea2
doc: unify section level between help topics
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17251
diff
changeset
|
284 ##################### |
12510 | 285 |
25558
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
22512
diff
changeset
|
286 The Mercurial destination will recognize Mercurial subrepositories in the |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
22512
diff
changeset
|
287 destination directory, and update the .hgsubstate file automatically if |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
22512
diff
changeset
|
288 the destination subrepositories contain the <dest>/<sub>/.hg/shamap file. |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
22512
diff
changeset
|
289 Converting a repository with subrepositories requires converting a single |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
22512
diff
changeset
|
290 repository at a time, from the bottom up. |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
22512
diff
changeset
|
291 |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
292 The following options are supported: |
12510 | 293 |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
294 convert.hg.clonebranches |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
295 dispatch source branches in separate clones. The default is |
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
296 False. |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
297 convert.hg.tagsbranch |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
298 branch name for tag revisions, defaults to "default". |
12922
58f0c60b7f40
convert: use field list instead of option list in help
Erik Zielke <ez@aragost.com>
parents:
12787
diff
changeset
|
299 convert.hg.usebranchnames |
15861
ee8f5e4ce7b8
minirst: simplify and standardize field list formatting
Olav Reinert <seroton10@gmail.com>
parents:
15443
diff
changeset
|
300 preserve branch names. The default is True. |
25750
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
301 convert.hg.sourcename |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
302 records the given string as a 'convert_source' extra value |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
303 on each commit made in the target repository. The default is |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
304 None. |
12510 | 305 |
25741
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
306 All Destinations |
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
307 ################ |
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
308 |
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
309 All destination types accept the following options: |
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
310 |
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
311 convert.skiptags |
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
312 does not convert tags from the source repo to the target |
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
313 repo. The default is False. |
86fe3c404c1e
convert: add config to not convert tags
Durham Goode <durham@fb.com>
parents:
25558
diff
changeset
|
314 |
25748
baea47cafe75
convert: add support for specifying multiple revs
Durham Goode <durham@fb.com>
parents:
25741
diff
changeset
|
315 options ([+] can be repeated): |
12510 | 316 |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
317 -s --source-type TYPE source repository type |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
318 -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
|
319 -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
|
320 -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
|
321 --filemap FILE remap file names using contents of file |
22300
35ab037de989
convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents:
22110
diff
changeset
|
322 --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
|
323 --splicemap FILE splice synthesized history into place |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
324 --branchmap FILE change branch names while converting |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
325 --branchsort try to sort changesets by branches |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
326 --datesort try to sort changesets by date |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
13494
diff
changeset
|
327 --sourcesort preserve source changesets order |
18819
05acdf8e1f23
convert: add closesort algorithm to mercurial sources
Constantine Linnick <theaspect@gmail.com>
parents:
18324
diff
changeset
|
328 --closesort try to reorder closed revisions |
12510 | 329 |
22110
26f7c8033bed
help: tweak --verbose command help hint
Matt Mackall <mpm@selenic.com>
parents:
21077
diff
changeset
|
330 (some details hidden, use --verbose to show complete help) |
12510 | 331 $ hg init a |
332 $ cd a | |
333 $ echo a > a | |
334 $ hg ci -d'0 0' -Ama | |
335 adding a | |
336 $ hg cp a b | |
337 $ hg ci -d'1 0' -mb | |
338 $ hg rm a | |
339 $ hg ci -d'2 0' -mc | |
340 $ hg mv b a | |
341 $ hg ci -d'3 0' -md | |
342 $ echo a >> a | |
343 $ hg ci -d'4 0' -me | |
344 $ cd .. | |
345 $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
346 assuming destination a-hg | |
347 initializing destination a-hg repository | |
348 scanning source... | |
349 sorting... | |
350 converting... | |
351 4 a | |
352 3 b | |
353 2 c | |
354 1 d | |
355 0 e | |
356 $ hg --cwd a-hg pull ../a | |
357 pulling from ../a | |
358 searching for changes | |
359 no changes found | |
7905
d596b1f2935a
convert: missing p4 tool is only slightly fatal
Mads Kiilerich <mads@kiilerich.com>
parents:
5805
diff
changeset
|
360 |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
361 conversion to existing file should fail |
12510 | 362 |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
363 $ touch bogusfile |
12510 | 364 $ hg convert a bogusfile |
365 initializing destination bogusfile repository | |
366 abort: cannot create new bundle repository | |
367 [255] | |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
368 |
20008
e54a078153f7
tests: skip tests that require not having root (issue4089)
Matt Mackall <mpm@selenic.com>
parents:
19891
diff
changeset
|
369 #if unix-permissions no-root |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
370 |
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
371 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
|
372 |
12510 | 373 $ mkdir bogusdir |
374 $ chmod 000 bogusdir | |
375 | |
376 $ hg convert a bogusdir | |
18227
720308f741cb
dispatch: show empty filename in OSError aborts
Mads Kiilerich <mads@kiilerich.com>
parents:
17974
diff
changeset
|
377 abort: Permission denied: 'bogusdir' |
12510 | 378 [255] |
379 | |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
380 user permissions should succeed |
9962
a7178eccf2dc
convert: better error on invalid repository type
Patrick Mezard <pmezard@gmail.com>
parents:
8674
diff
changeset
|
381 |
12510 | 382 $ chmod 700 bogusdir |
383 $ hg convert a bogusdir | |
384 initializing destination bogusdir repository | |
385 scanning source... | |
386 sorting... | |
387 converting... | |
388 4 a | |
389 3 b | |
390 2 c | |
391 1 d | |
392 0 e | |
393 | |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
394 #endif |
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16107
diff
changeset
|
395 |
12510 | 396 test pre and post conversion actions |
397 | |
398 $ echo 'include b' > filemap | |
399 $ hg convert --debug --filemap filemap a partialb | \ | |
400 > grep 'run hg' | |
401 run hg source pre-conversion action | |
402 run hg sink pre-conversion action | |
403 run hg sink post-conversion action | |
404 run hg source post-conversion action | |
405 | |
406 converting empty dir should fail "nicely | |
407 | |
408 $ mkdir emptydir | |
409 | |
410 override $PATH to ensure p4 not visible; use $PYTHON in case we're | |
411 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
|
412 |
12510 | 413 $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir |
414 assuming destination emptydir-hg | |
415 initializing destination emptydir-hg repository | |
416 emptydir does not look like a CVS checkout | |
417 emptydir does not look like a Git repository | |
418 emptydir does not look like a Subversion repository | |
419 emptydir is not a local Mercurial repository | |
420 emptydir does not look like a darcs repository | |
421 emptydir does not look like a monotone repository | |
422 emptydir does not look like a GNU Arch repository | |
423 emptydir does not look like a Bazaar repository | |
424 cannot find required "p4" tool | |
425 abort: emptydir: missing or unsupported repository | |
426 [255] | |
427 | |
428 convert with imaginary source type | |
429 | |
430 $ hg convert --source-type foo a a-foo | |
431 initializing destination a-foo repository | |
432 abort: foo: invalid source repository type | |
433 [255] | |
434 | |
435 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
|
436 |
12510 | 437 $ hg convert --dest-type foo a a-foo |
438 abort: foo: invalid destination repository type | |
439 [255] | |
440 | |
441 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
|
442 |
12510 | 443 $ hg convert a b |
444 initializing destination b repository | |
445 scanning source... | |
446 sorting... | |
447 converting... | |
448 4 a | |
449 3 b | |
450 2 c | |
451 1 d | |
452 0 e | |
453 | |
454 contents of fncache file: | |
455 | |
13389
3efc99ac2ac4
tests: sort fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
13011
diff
changeset
|
456 $ cat b/.hg/store/fncache | sort |
12510 | 457 data/a.i |
458 data/b.i | |
459 | |
460 test bogus URL | |
461 | |
462 $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz | |
463 abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository | |
464 [255] | |
17002
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
465 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
466 test revset converted() lookup |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
467 |
17345
4f8054d3171b
check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents:
17267
diff
changeset
|
468 $ 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
|
469 initializing destination c repository |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
470 scanning source... |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
471 sorting... |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
472 converting... |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
473 4 a |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
474 3 b |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
475 2 c |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
476 1 d |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
477 0 e |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
478 $ echo f > c/f |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
479 $ 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
|
480 adding f |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
481 created new head |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
482 $ 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
|
483 changeset: 1:98c3dd46a874 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
484 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
485 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
|
486 summary: b |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
487 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
488 $ 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
|
489 changeset: 0:31ed57b2037c |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
490 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
491 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
|
492 summary: a |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
493 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
494 changeset: 1:98c3dd46a874 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
495 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
496 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
|
497 summary: b |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
498 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
499 changeset: 2:3b9ca06ef716 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
500 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
501 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
|
502 summary: c |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
503 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
504 changeset: 3:4e0debd37cf2 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
505 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
506 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
|
507 summary: d |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
508 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
509 changeset: 4:9de3bc9349c5 |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
510 user: test |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
511 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
|
512 summary: e |
0eb522625eb2
revset: add a predicate for finding converted changesets
Matt Harbison <matt_harbison@yahoo.com>
parents:
16986
diff
changeset
|
513 |
25750
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
514 |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
515 test specifying a sourcename |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
516 $ echo g > a/g |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
517 $ 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
|
518 adding g |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
519 $ 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
|
520 scanning source... |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
521 sorting... |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
522 converting... |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
523 0 g |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
524 $ 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
|
525 branch=default |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
526 convert_revision=a3bc6100aa8ec03e00aaf271f1f50046fb432072 |
c9093d4d1ff6
convert: add config for recording the source name
Durham Goode <durham@fb.com>
parents:
25748
diff
changeset
|
527 convert_source=mysource |