##// END OF EJS Templates
tests: sort fncache
Adrian Buehlmann -
r13389:3efc99ac default
parent child Browse files
Show More
@@ -1,392 +1,392 b''
1
1
2 $ cat >> $HGRCPATH <<EOF
2 $ cat >> $HGRCPATH <<EOF
3 > [extensions]
3 > [extensions]
4 > convert=
4 > convert=
5 > [convert]
5 > [convert]
6 > hg.saverev=False
6 > hg.saverev=False
7 > EOF
7 > EOF
8 $ hg help convert
8 $ hg help convert
9 hg convert [OPTION]... SOURCE [DEST [REVMAP]]
9 hg convert [OPTION]... SOURCE [DEST [REVMAP]]
10
10
11 convert a foreign SCM repository to a Mercurial one.
11 convert a foreign SCM repository to a Mercurial one.
12
12
13 Accepted source formats [identifiers]:
13 Accepted source formats [identifiers]:
14
14
15 - Mercurial [hg]
15 - Mercurial [hg]
16 - CVS [cvs]
16 - CVS [cvs]
17 - Darcs [darcs]
17 - Darcs [darcs]
18 - git [git]
18 - git [git]
19 - Subversion [svn]
19 - Subversion [svn]
20 - Monotone [mtn]
20 - Monotone [mtn]
21 - GNU Arch [gnuarch]
21 - GNU Arch [gnuarch]
22 - Bazaar [bzr]
22 - Bazaar [bzr]
23 - Perforce [p4]
23 - Perforce [p4]
24
24
25 Accepted destination formats [identifiers]:
25 Accepted destination formats [identifiers]:
26
26
27 - Mercurial [hg]
27 - Mercurial [hg]
28 - Subversion [svn] (history on branches is not preserved)
28 - Subversion [svn] (history on branches is not preserved)
29
29
30 If no revision is given, all revisions will be converted. Otherwise,
30 If no revision is given, all revisions will be converted. Otherwise,
31 convert will only import up to the named revision (given in a format
31 convert will only import up to the named revision (given in a format
32 understood by the source).
32 understood by the source).
33
33
34 If no destination directory name is specified, it defaults to the basename
34 If no destination directory name is specified, it defaults to the basename
35 of the source with "-hg" appended. If the destination repository doesn't
35 of the source with "-hg" appended. If the destination repository doesn't
36 exist, it will be created.
36 exist, it will be created.
37
37
38 By default, all sources except Mercurial will use --branchsort. Mercurial
38 By default, all sources except Mercurial will use --branchsort. Mercurial
39 uses --sourcesort to preserve original revision numbers order. Sort modes
39 uses --sourcesort to preserve original revision numbers order. Sort modes
40 have the following effects:
40 have the following effects:
41
41
42 --branchsort convert from parent to child revision when possible, which
42 --branchsort convert from parent to child revision when possible, which
43 means branches are usually converted one after the other.
43 means branches are usually converted one after the other.
44 It generates more compact repositories.
44 It generates more compact repositories.
45 --datesort sort revisions by date. Converted repositories have good-
45 --datesort sort revisions by date. Converted repositories have good-
46 looking changelogs but are often an order of magnitude
46 looking changelogs but are often an order of magnitude
47 larger than the same ones generated by --branchsort.
47 larger than the same ones generated by --branchsort.
48 --sourcesort try to preserve source revisions order, only supported by
48 --sourcesort try to preserve source revisions order, only supported by
49 Mercurial sources.
49 Mercurial sources.
50
50
51 If "REVMAP" isn't given, it will be put in a default location
51 If "REVMAP" isn't given, it will be put in a default location
52 ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that
52 ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that
53 maps each source commit ID to the destination ID for that revision, like
53 maps each source commit ID to the destination ID for that revision, like
54 so:
54 so:
55
55
56 <source ID> <destination ID>
56 <source ID> <destination ID>
57
57
58 If the file doesn't exist, it's automatically created. It's updated on
58 If the file doesn't exist, it's automatically created. It's updated on
59 each commit copied, so "hg convert" can be interrupted and can be run
59 each commit copied, so "hg convert" can be interrupted and can be run
60 repeatedly to copy new commits.
60 repeatedly to copy new commits.
61
61
62 The authormap is a simple text file that maps each source commit author to
62 The authormap is a simple text file that maps each source commit author to
63 a destination commit author. It is handy for source SCMs that use unix
63 a destination commit author. It is handy for source SCMs that use unix
64 logins to identify authors (eg: CVS). One line per author mapping and the
64 logins to identify authors (eg: CVS). One line per author mapping and the
65 line format is:
65 line format is:
66
66
67 source author = destination author
67 source author = destination author
68
68
69 Empty lines and lines starting with a "#" are ignored.
69 Empty lines and lines starting with a "#" are ignored.
70
70
71 The filemap is a file that allows filtering and remapping of files and
71 The filemap is a file that allows filtering and remapping of files and
72 directories. Each line can contain one of the following directives:
72 directories. Each line can contain one of the following directives:
73
73
74 include path/to/file-or-dir
74 include path/to/file-or-dir
75
75
76 exclude path/to/file-or-dir
76 exclude path/to/file-or-dir
77
77
78 rename path/to/source path/to/destination
78 rename path/to/source path/to/destination
79
79
80 Comment lines start with "#". A specified path matches if it equals the
80 Comment lines start with "#". A specified path matches if it equals the
81 full relative name of a file or one of its parent directories. The
81 full relative name of a file or one of its parent directories. The
82 "include" or "exclude" directive with the longest matching path applies,
82 "include" or "exclude" directive with the longest matching path applies,
83 so line order does not matter.
83 so line order does not matter.
84
84
85 The "include" directive causes a file, or all files under a directory, to
85 The "include" directive causes a file, or all files under a directory, to
86 be included in the destination repository, and the exclusion of all other
86 be included in the destination repository, and the exclusion of all other
87 files and directories not explicitly included. The "exclude" directive
87 files and directories not explicitly included. The "exclude" directive
88 causes files or directories to be omitted. The "rename" directive renames
88 causes files or directories to be omitted. The "rename" directive renames
89 a file or directory if it is converted. To rename from a subdirectory into
89 a file or directory if it is converted. To rename from a subdirectory into
90 the root of the repository, use "." as the path to rename to.
90 the root of the repository, use "." as the path to rename to.
91
91
92 The splicemap is a file that allows insertion of synthetic history,
92 The splicemap is a file that allows insertion of synthetic history,
93 letting you specify the parents of a revision. This is useful if you want
93 letting you specify the parents of a revision. This is useful if you want
94 to e.g. give a Subversion merge two parents, or graft two disconnected
94 to e.g. give a Subversion merge two parents, or graft two disconnected
95 series of history together. Each entry contains a key, followed by a
95 series of history together. Each entry contains a key, followed by a
96 space, followed by one or two comma-separated values:
96 space, followed by one or two comma-separated values:
97
97
98 key parent1, parent2
98 key parent1, parent2
99
99
100 The key is the revision ID in the source revision control system whose
100 The key is the revision ID in the source revision control system whose
101 parents should be modified (same format as a key in .hg/shamap). The
101 parents should be modified (same format as a key in .hg/shamap). The
102 values are the revision IDs (in either the source or destination revision
102 values are the revision IDs (in either the source or destination revision
103 control system) that should be used as the new parents for that node. For
103 control system) that should be used as the new parents for that node. For
104 example, if you have merged "release-1.0" into "trunk", then you should
104 example, if you have merged "release-1.0" into "trunk", then you should
105 specify the revision on "trunk" as the first parent and the one on the
105 specify the revision on "trunk" as the first parent and the one on the
106 "release-1.0" branch as the second.
106 "release-1.0" branch as the second.
107
107
108 The branchmap is a file that allows you to rename a branch when it is
108 The branchmap is a file that allows you to rename a branch when it is
109 being brought in from whatever external repository. When used in
109 being brought in from whatever external repository. When used in
110 conjunction with a splicemap, it allows for a powerful combination to help
110 conjunction with a splicemap, it allows for a powerful combination to help
111 fix even the most badly mismanaged repositories and turn them into nicely
111 fix even the most badly mismanaged repositories and turn them into nicely
112 structured Mercurial repositories. The branchmap contains lines of the
112 structured Mercurial repositories. The branchmap contains lines of the
113 form:
113 form:
114
114
115 original_branch_name new_branch_name
115 original_branch_name new_branch_name
116
116
117 where "original_branch_name" is the name of the branch in the source
117 where "original_branch_name" is the name of the branch in the source
118 repository, and "new_branch_name" is the name of the branch is the
118 repository, and "new_branch_name" is the name of the branch is the
119 destination repository. No whitespace is allowed in the branch names. This
119 destination repository. No whitespace is allowed in the branch names. This
120 can be used to (for instance) move code in one repository from "default"
120 can be used to (for instance) move code in one repository from "default"
121 to a named branch.
121 to a named branch.
122
122
123 Mercurial Source
123 Mercurial Source
124 ''''''''''''''''
124 ''''''''''''''''
125
125
126 The Mercurial source recognizes the following configuration options, which
126 The Mercurial source recognizes the following configuration options, which
127 you can set on the command line with "--config":
127 you can set on the command line with "--config":
128
128
129 convert.hg.ignoreerrors
129 convert.hg.ignoreerrors
130 ignore integrity errors when reading. Use it to fix Mercurial
130 ignore integrity errors when reading. Use it to fix Mercurial
131 repositories with missing revlogs, by converting from and to
131 repositories with missing revlogs, by converting from and to
132 Mercurial. Default is False.
132 Mercurial. Default is False.
133 convert.hg.saverev
133 convert.hg.saverev
134 store original. revision ID in changeset (forces target IDs to
134 store original. revision ID in changeset (forces target IDs to
135 change). It takes and boolean argument and defaults to False.
135 change). It takes and boolean argument and defaults to False.
136 convert.hg.startrev
136 convert.hg.startrev
137 convert start revision and its descendants. It takes a hg
137 convert start revision and its descendants. It takes a hg
138 revision identifier and defaults to 0.
138 revision identifier and defaults to 0.
139
139
140 CVS Source
140 CVS Source
141 ''''''''''
141 ''''''''''
142
142
143 CVS source will use a sandbox (i.e. a checked-out copy) from CVS to
143 CVS source will use a sandbox (i.e. a checked-out copy) from CVS to
144 indicate the starting point of what will be converted. Direct access to
144 indicate the starting point of what will be converted. Direct access to
145 the repository files is not needed, unless of course the repository is
145 the repository files is not needed, unless of course the repository is
146 ":local:". The conversion uses the top level directory in the sandbox to
146 ":local:". The conversion uses the top level directory in the sandbox to
147 find the CVS repository, and then uses CVS rlog commands to find files to
147 find the CVS repository, and then uses CVS rlog commands to find files to
148 convert. This means that unless a filemap is given, all files under the
148 convert. This means that unless a filemap is given, all files under the
149 starting directory will be converted, and that any directory
149 starting directory will be converted, and that any directory
150 reorganization in the CVS sandbox is ignored.
150 reorganization in the CVS sandbox is ignored.
151
151
152 The following options can be used with "--config":
152 The following options can be used with "--config":
153
153
154 convert.cvsps.cache
154 convert.cvsps.cache
155 Set to False to disable remote log caching, for testing and
155 Set to False to disable remote log caching, for testing and
156 debugging purposes. Default is True.
156 debugging purposes. Default is True.
157 convert.cvsps.fuzz
157 convert.cvsps.fuzz
158 Specify the maximum time (in seconds) that is allowed between
158 Specify the maximum time (in seconds) that is allowed between
159 commits with identical user and log message in a single
159 commits with identical user and log message in a single
160 changeset. When very large files were checked in as part of a
160 changeset. When very large files were checked in as part of a
161 changeset then the default may not be long enough. The default
161 changeset then the default may not be long enough. The default
162 is 60.
162 is 60.
163 convert.cvsps.mergeto
163 convert.cvsps.mergeto
164 Specify a regular expression to which commit log messages are
164 Specify a regular expression to which commit log messages are
165 matched. If a match occurs, then the conversion process will
165 matched. If a match occurs, then the conversion process will
166 insert a dummy revision merging the branch on which this log
166 insert a dummy revision merging the branch on which this log
167 message occurs to the branch indicated in the regex. Default
167 message occurs to the branch indicated in the regex. Default
168 is "{{mergetobranch ([-\w]+)}}"
168 is "{{mergetobranch ([-\w]+)}}"
169 convert.cvsps.mergefrom
169 convert.cvsps.mergefrom
170 Specify a regular expression to which commit log messages are
170 Specify a regular expression to which commit log messages are
171 matched. If a match occurs, then the conversion process will
171 matched. If a match occurs, then the conversion process will
172 add the most recent revision on the branch indicated in the
172 add the most recent revision on the branch indicated in the
173 regex as the second parent of the changeset. Default is
173 regex as the second parent of the changeset. Default is
174 "{{mergefrombranch ([-\w]+)}}"
174 "{{mergefrombranch ([-\w]+)}}"
175 hook.cvslog
175 hook.cvslog
176 Specify a Python function to be called at the end of gathering
176 Specify a Python function to be called at the end of gathering
177 the CVS log. The function is passed a list with the log
177 the CVS log. The function is passed a list with the log
178 entries, and can modify the entries in-place, or add or delete
178 entries, and can modify the entries in-place, or add or delete
179 them.
179 them.
180 hook.cvschangesets
180 hook.cvschangesets
181 Specify a Python function to be called after the changesets
181 Specify a Python function to be called after the changesets
182 are calculated from the the CVS log. The function is passed a
182 are calculated from the the CVS log. The function is passed a
183 list with the changeset entries, and can modify the changesets
183 list with the changeset entries, and can modify the changesets
184 in-place, or add or delete them.
184 in-place, or add or delete them.
185
185
186 An additional "debugcvsps" Mercurial command allows the builtin changeset
186 An additional "debugcvsps" Mercurial command allows the builtin changeset
187 merging code to be run without doing a conversion. Its parameters and
187 merging code to be run without doing a conversion. Its parameters and
188 output are similar to that of cvsps 2.1. Please see the command help for
188 output are similar to that of cvsps 2.1. Please see the command help for
189 more details.
189 more details.
190
190
191 Subversion Source
191 Subversion Source
192 '''''''''''''''''
192 '''''''''''''''''
193
193
194 Subversion source detects classical trunk/branches/tags layouts. By
194 Subversion source detects classical trunk/branches/tags layouts. By
195 default, the supplied "svn://repo/path/" source URL is converted as a
195 default, the supplied "svn://repo/path/" source URL is converted as a
196 single branch. If "svn://repo/path/trunk" exists it replaces the default
196 single branch. If "svn://repo/path/trunk" exists it replaces the default
197 branch. If "svn://repo/path/branches" exists, its subdirectories are
197 branch. If "svn://repo/path/branches" exists, its subdirectories are
198 listed as possible branches. If "svn://repo/path/tags" exists, it is
198 listed as possible branches. If "svn://repo/path/tags" exists, it is
199 looked for tags referencing converted branches. Default "trunk",
199 looked for tags referencing converted branches. Default "trunk",
200 "branches" and "tags" values can be overridden with following options. Set
200 "branches" and "tags" values can be overridden with following options. Set
201 them to paths relative to the source URL, or leave them blank to disable
201 them to paths relative to the source URL, or leave them blank to disable
202 auto detection.
202 auto detection.
203
203
204 The following options can be set with "--config":
204 The following options can be set with "--config":
205
205
206 convert.svn.branches
206 convert.svn.branches
207 specify the directory containing branches. The defaults is
207 specify the directory containing branches. The defaults is
208 "branches".
208 "branches".
209 convert.svn.tags
209 convert.svn.tags
210 specify the directory containing tags. The default is "tags".
210 specify the directory containing tags. The default is "tags".
211 convert.svn.trunk
211 convert.svn.trunk
212 specify the name of the trunk branch The defauls is "trunk".
212 specify the name of the trunk branch The defauls is "trunk".
213
213
214 Source history can be retrieved starting at a specific revision, instead
214 Source history can be retrieved starting at a specific revision, instead
215 of being integrally converted. Only single branch conversions are
215 of being integrally converted. Only single branch conversions are
216 supported.
216 supported.
217
217
218 convert.svn.startrev
218 convert.svn.startrev
219 specify start Subversion revision number. The default is 0.
219 specify start Subversion revision number. The default is 0.
220
220
221 Perforce Source
221 Perforce Source
222 '''''''''''''''
222 '''''''''''''''
223
223
224 The Perforce (P4) importer can be given a p4 depot path or a client
224 The Perforce (P4) importer can be given a p4 depot path or a client
225 specification as source. It will convert all files in the source to a flat
225 specification as source. It will convert all files in the source to a flat
226 Mercurial repository, ignoring labels, branches and integrations. Note
226 Mercurial repository, ignoring labels, branches and integrations. Note
227 that when a depot path is given you then usually should specify a target
227 that when a depot path is given you then usually should specify a target
228 directory, because otherwise the target may be named "...-hg".
228 directory, because otherwise the target may be named "...-hg".
229
229
230 It is possible to limit the amount of source history to be converted by
230 It is possible to limit the amount of source history to be converted by
231 specifying an initial Perforce revision:
231 specifying an initial Perforce revision:
232
232
233 convert.p4.startrev
233 convert.p4.startrev
234 specify initial Perforce revision, a Perforce changelist
234 specify initial Perforce revision, a Perforce changelist
235 number).
235 number).
236
236
237 Mercurial Destination
237 Mercurial Destination
238 '''''''''''''''''''''
238 '''''''''''''''''''''
239
239
240 The following options are supported:
240 The following options are supported:
241
241
242 convert.hg.clonebranches
242 convert.hg.clonebranches
243 dispatch source branches in separate clones. The default is
243 dispatch source branches in separate clones. The default is
244 False.
244 False.
245 convert.hg.tagsbranch
245 convert.hg.tagsbranch
246 branch name for tag revisions, defaults to "default".
246 branch name for tag revisions, defaults to "default".
247 convert.hg.usebranchnames
247 convert.hg.usebranchnames
248 preserve branch names. The default is True
248 preserve branch names. The default is True
249
249
250 options:
250 options:
251
251
252 -s --source-type TYPE source repository type
252 -s --source-type TYPE source repository type
253 -d --dest-type TYPE destination repository type
253 -d --dest-type TYPE destination repository type
254 -r --rev REV import up to target revision REV
254 -r --rev REV import up to target revision REV
255 -A --authormap FILE remap usernames using this file
255 -A --authormap FILE remap usernames using this file
256 --filemap FILE remap file names using contents of file
256 --filemap FILE remap file names using contents of file
257 --splicemap FILE splice synthesized history into place
257 --splicemap FILE splice synthesized history into place
258 --branchmap FILE change branch names while converting
258 --branchmap FILE change branch names while converting
259 --branchsort try to sort changesets by branches
259 --branchsort try to sort changesets by branches
260 --datesort try to sort changesets by date
260 --datesort try to sort changesets by date
261 --sourcesort preserve source changesets order
261 --sourcesort preserve source changesets order
262
262
263 use "hg -v help convert" to show global options
263 use "hg -v help convert" to show global options
264 $ hg init a
264 $ hg init a
265 $ cd a
265 $ cd a
266 $ echo a > a
266 $ echo a > a
267 $ hg ci -d'0 0' -Ama
267 $ hg ci -d'0 0' -Ama
268 adding a
268 adding a
269 $ hg cp a b
269 $ hg cp a b
270 $ hg ci -d'1 0' -mb
270 $ hg ci -d'1 0' -mb
271 $ hg rm a
271 $ hg rm a
272 $ hg ci -d'2 0' -mc
272 $ hg ci -d'2 0' -mc
273 $ hg mv b a
273 $ hg mv b a
274 $ hg ci -d'3 0' -md
274 $ hg ci -d'3 0' -md
275 $ echo a >> a
275 $ echo a >> a
276 $ hg ci -d'4 0' -me
276 $ hg ci -d'4 0' -me
277 $ cd ..
277 $ cd ..
278 $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded'
278 $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded'
279 assuming destination a-hg
279 assuming destination a-hg
280 initializing destination a-hg repository
280 initializing destination a-hg repository
281 scanning source...
281 scanning source...
282 sorting...
282 sorting...
283 converting...
283 converting...
284 4 a
284 4 a
285 3 b
285 3 b
286 2 c
286 2 c
287 1 d
287 1 d
288 0 e
288 0 e
289 $ hg --cwd a-hg pull ../a
289 $ hg --cwd a-hg pull ../a
290 pulling from ../a
290 pulling from ../a
291 searching for changes
291 searching for changes
292 no changes found
292 no changes found
293 $ touch bogusfile
293 $ touch bogusfile
294
294
295 should fail
295 should fail
296
296
297 $ hg convert a bogusfile
297 $ hg convert a bogusfile
298 initializing destination bogusfile repository
298 initializing destination bogusfile repository
299 abort: cannot create new bundle repository
299 abort: cannot create new bundle repository
300 [255]
300 [255]
301 $ mkdir bogusdir
301 $ mkdir bogusdir
302 $ chmod 000 bogusdir
302 $ chmod 000 bogusdir
303
303
304 should fail
304 should fail
305
305
306 $ hg convert a bogusdir
306 $ hg convert a bogusdir
307 abort: Permission denied: bogusdir
307 abort: Permission denied: bogusdir
308 [255]
308 [255]
309
309
310 should succeed
310 should succeed
311
311
312 $ chmod 700 bogusdir
312 $ chmod 700 bogusdir
313 $ hg convert a bogusdir
313 $ hg convert a bogusdir
314 initializing destination bogusdir repository
314 initializing destination bogusdir repository
315 scanning source...
315 scanning source...
316 sorting...
316 sorting...
317 converting...
317 converting...
318 4 a
318 4 a
319 3 b
319 3 b
320 2 c
320 2 c
321 1 d
321 1 d
322 0 e
322 0 e
323
323
324 test pre and post conversion actions
324 test pre and post conversion actions
325
325
326 $ echo 'include b' > filemap
326 $ echo 'include b' > filemap
327 $ hg convert --debug --filemap filemap a partialb | \
327 $ hg convert --debug --filemap filemap a partialb | \
328 > grep 'run hg'
328 > grep 'run hg'
329 run hg source pre-conversion action
329 run hg source pre-conversion action
330 run hg sink pre-conversion action
330 run hg sink pre-conversion action
331 run hg sink post-conversion action
331 run hg sink post-conversion action
332 run hg source post-conversion action
332 run hg source post-conversion action
333
333
334 converting empty dir should fail "nicely
334 converting empty dir should fail "nicely
335
335
336 $ mkdir emptydir
336 $ mkdir emptydir
337
337
338 override $PATH to ensure p4 not visible; use $PYTHON in case we're
338 override $PATH to ensure p4 not visible; use $PYTHON in case we're
339 running from a devel copy, not a temp installation
339 running from a devel copy, not a temp installation
340
340
341 $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir
341 $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir
342 assuming destination emptydir-hg
342 assuming destination emptydir-hg
343 initializing destination emptydir-hg repository
343 initializing destination emptydir-hg repository
344 emptydir does not look like a CVS checkout
344 emptydir does not look like a CVS checkout
345 emptydir does not look like a Git repository
345 emptydir does not look like a Git repository
346 emptydir does not look like a Subversion repository
346 emptydir does not look like a Subversion repository
347 emptydir is not a local Mercurial repository
347 emptydir is not a local Mercurial repository
348 emptydir does not look like a darcs repository
348 emptydir does not look like a darcs repository
349 emptydir does not look like a monotone repository
349 emptydir does not look like a monotone repository
350 emptydir does not look like a GNU Arch repository
350 emptydir does not look like a GNU Arch repository
351 emptydir does not look like a Bazaar repository
351 emptydir does not look like a Bazaar repository
352 cannot find required "p4" tool
352 cannot find required "p4" tool
353 abort: emptydir: missing or unsupported repository
353 abort: emptydir: missing or unsupported repository
354 [255]
354 [255]
355
355
356 convert with imaginary source type
356 convert with imaginary source type
357
357
358 $ hg convert --source-type foo a a-foo
358 $ hg convert --source-type foo a a-foo
359 initializing destination a-foo repository
359 initializing destination a-foo repository
360 abort: foo: invalid source repository type
360 abort: foo: invalid source repository type
361 [255]
361 [255]
362
362
363 convert with imaginary sink type
363 convert with imaginary sink type
364
364
365 $ hg convert --dest-type foo a a-foo
365 $ hg convert --dest-type foo a a-foo
366 abort: foo: invalid destination repository type
366 abort: foo: invalid destination repository type
367 [255]
367 [255]
368
368
369 testing: convert must not produce duplicate entries in fncache
369 testing: convert must not produce duplicate entries in fncache
370
370
371 $ hg convert a b
371 $ hg convert a b
372 initializing destination b repository
372 initializing destination b repository
373 scanning source...
373 scanning source...
374 sorting...
374 sorting...
375 converting...
375 converting...
376 4 a
376 4 a
377 3 b
377 3 b
378 2 c
378 2 c
379 1 d
379 1 d
380 0 e
380 0 e
381
381
382 contents of fncache file:
382 contents of fncache file:
383
383
384 $ cat b/.hg/store/fncache
384 $ cat b/.hg/store/fncache | sort
385 data/a.i
385 data/a.i
386 data/b.i
386 data/b.i
387
387
388 test bogus URL
388 test bogus URL
389
389
390 $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz
390 $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz
391 abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository
391 abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository
392 [255]
392 [255]
@@ -1,109 +1,109 b''
1 Init repo1:
1 Init repo1:
2
2
3 $ hg init repo1
3 $ hg init repo1
4 $ cd repo1
4 $ cd repo1
5 $ echo "some text" > a
5 $ echo "some text" > a
6 $ hg add
6 $ hg add
7 adding a
7 adding a
8 $ hg ci -m first
8 $ hg ci -m first
9 $ cat .hg/store/fncache
9 $ cat .hg/store/fncache | sort
10 data/a.i
10 data/a.i
11
11
12 Testing a.i/b:
12 Testing a.i/b:
13
13
14 $ mkdir a.i
14 $ mkdir a.i
15 $ echo "some other text" > a.i/b
15 $ echo "some other text" > a.i/b
16 $ hg add
16 $ hg add
17 adding a.i/b
17 adding a.i/b
18 $ hg ci -m second
18 $ hg ci -m second
19 $ cat .hg/store/fncache
19 $ cat .hg/store/fncache | sort
20 data/a.i
20 data/a.i
21 data/a.i.hg/b.i
21 data/a.i.hg/b.i
22
22
23 Testing a.i.hg/c:
23 Testing a.i.hg/c:
24
24
25 $ mkdir a.i.hg
25 $ mkdir a.i.hg
26 $ echo "yet another text" > a.i.hg/c
26 $ echo "yet another text" > a.i.hg/c
27 $ hg add
27 $ hg add
28 adding a.i.hg/c
28 adding a.i.hg/c
29 $ hg ci -m third
29 $ hg ci -m third
30 $ cat .hg/store/fncache
30 $ cat .hg/store/fncache | sort
31 data/a.i
31 data/a.i
32 data/a.i.hg.hg/c.i
32 data/a.i.hg/b.i
33 data/a.i.hg/b.i
33 data/a.i.hg.hg/c.i
34
34
35 Testing verify:
35 Testing verify:
36
36
37 $ hg verify
37 $ hg verify
38 checking changesets
38 checking changesets
39 checking manifests
39 checking manifests
40 crosschecking files in changesets and manifests
40 crosschecking files in changesets and manifests
41 checking files
41 checking files
42 3 files, 3 changesets, 3 total revisions
42 3 files, 3 changesets, 3 total revisions
43
43
44 $ rm .hg/store/fncache
44 $ rm .hg/store/fncache
45
45
46 $ hg verify
46 $ hg verify
47 checking changesets
47 checking changesets
48 checking manifests
48 checking manifests
49 crosschecking files in changesets and manifests
49 crosschecking files in changesets and manifests
50 checking files
50 checking files
51 data/a.i@0: missing revlog!
51 data/a.i@0: missing revlog!
52 data/a.i.hg/c.i@2: missing revlog!
52 data/a.i.hg/c.i@2: missing revlog!
53 data/a.i/b.i@1: missing revlog!
53 data/a.i/b.i@1: missing revlog!
54 3 files, 3 changesets, 3 total revisions
54 3 files, 3 changesets, 3 total revisions
55 3 integrity errors encountered!
55 3 integrity errors encountered!
56 (first damaged changeset appears to be 0)
56 (first damaged changeset appears to be 0)
57 [1]
57 [1]
58 $ cd ..
58 $ cd ..
59
59
60 Non store repo:
60 Non store repo:
61
61
62 $ hg --config format.usestore=False init foo
62 $ hg --config format.usestore=False init foo
63 $ cd foo
63 $ cd foo
64 $ mkdir tst.d
64 $ mkdir tst.d
65 $ echo foo > tst.d/foo
65 $ echo foo > tst.d/foo
66 $ hg ci -Amfoo
66 $ hg ci -Amfoo
67 adding tst.d/foo
67 adding tst.d/foo
68 $ find .hg | sort
68 $ find .hg | sort
69 .hg
69 .hg
70 .hg/00changelog.i
70 .hg/00changelog.i
71 .hg/00manifest.i
71 .hg/00manifest.i
72 .hg/data
72 .hg/data
73 .hg/data/tst.d.hg
73 .hg/data/tst.d.hg
74 .hg/data/tst.d.hg/foo.i
74 .hg/data/tst.d.hg/foo.i
75 .hg/dirstate
75 .hg/dirstate
76 .hg/last-message.txt
76 .hg/last-message.txt
77 .hg/requires
77 .hg/requires
78 .hg/undo
78 .hg/undo
79 .hg/undo.branch
79 .hg/undo.branch
80 .hg/undo.desc
80 .hg/undo.desc
81 .hg/undo.dirstate
81 .hg/undo.dirstate
82 $ cd ..
82 $ cd ..
83
83
84 Non fncache repo:
84 Non fncache repo:
85
85
86 $ hg --config format.usefncache=False init bar
86 $ hg --config format.usefncache=False init bar
87 $ cd bar
87 $ cd bar
88 $ mkdir tst.d
88 $ mkdir tst.d
89 $ echo foo > tst.d/Foo
89 $ echo foo > tst.d/Foo
90 $ hg ci -Amfoo
90 $ hg ci -Amfoo
91 adding tst.d/Foo
91 adding tst.d/Foo
92 $ find .hg | sort
92 $ find .hg | sort
93 .hg
93 .hg
94 .hg/00changelog.i
94 .hg/00changelog.i
95 .hg/dirstate
95 .hg/dirstate
96 .hg/last-message.txt
96 .hg/last-message.txt
97 .hg/requires
97 .hg/requires
98 .hg/store
98 .hg/store
99 .hg/store/00changelog.i
99 .hg/store/00changelog.i
100 .hg/store/00manifest.i
100 .hg/store/00manifest.i
101 .hg/store/data
101 .hg/store/data
102 .hg/store/data/tst.d.hg
102 .hg/store/data/tst.d.hg
103 .hg/store/data/tst.d.hg/_foo.i
103 .hg/store/data/tst.d.hg/_foo.i
104 .hg/store/undo
104 .hg/store/undo
105 .hg/undo.branch
105 .hg/undo.branch
106 .hg/undo.desc
106 .hg/undo.desc
107 .hg/undo.dirstate
107 .hg/undo.dirstate
108 $ cd ..
108 $ cd ..
109
109
General Comments 0
You need to be logged in to leave comments. Login now