comparison tests/test-convert-filemap.t @ 14151:1fe82c93b8e2

convert: also catch missing revlogs when introduced in repo roots The previous behaviour was almost as if convert.hg.ignoreerrors was always set for revisions without parents, except that errors were silently ignored. Revlog errors are handled as a side effect of getcopies(), but getcopies() was only called when convert.hg.ignoreerrors was set. Now we always call self.getcopies for root revisions, not only when convert.hg.ignoreerrors is set, just like we do on all other revisions. The extra call might be a bit expensive, but the proper fix for that would be to catch these errors in another way.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 01 May 2011 17:34:16 +0200
parents 82845434e974
children 1e9451476bf8
comparison
equal deleted inserted replaced
14150:3a3584967a93 14151:1fe82c93b8e2
12 $ echo foo > foo 12 $ echo foo > foo
13 $ echo baz > baz 13 $ echo baz > baz
14 $ mkdir -p dir/subdir 14 $ mkdir -p dir/subdir
15 $ echo dir/file >> dir/file 15 $ echo dir/file >> dir/file
16 $ echo dir/file2 >> dir/file2 16 $ echo dir/file2 >> dir/file2
17 $ echo dir/file3 >> dir/file3 # to be corrupted in rev 0
17 $ echo dir/subdir/file3 >> dir/subdir/file3 18 $ echo dir/subdir/file3 >> dir/subdir/file3
18 $ echo dir/subdir/file4 >> dir/subdir/file4 19 $ echo dir/subdir/file4 >> dir/subdir/file4
19 $ hg ci -d '0 0' -qAm '0: add foo baz dir/' 20 $ hg ci -d '0 0' -qAm '0: add foo baz dir/'
20 $ echo bar > bar 21 $ echo bar > bar
21 $ echo quux > quux 22 $ echo quux > quux
23 $ echo dir/file4 >> dir/file4 # to be corrupted in rev 1
22 $ hg copy foo copied 24 $ hg copy foo copied
23 $ hg ci -d '1 0' -qAm '1: add bar quux; copy foo to copied' 25 $ hg ci -d '1 0' -qAm '1: add bar quux; copy foo to copied'
24 $ echo >> foo 26 $ echo >> foo
25 $ hg ci -d '2 0' -m '2: change foo' 27 $ hg ci -d '2 0' -m '2: change foo'
26 $ hg up -qC 1 28 $ hg up -qC 1
61 |\ 63 |\
62 | o 3 "3: change bar quux" files: bar quux 64 | o 3 "3: change bar quux" files: bar quux
63 | | 65 | |
64 o | 2 "2: change foo" files: foo 66 o | 2 "2: change foo" files: foo
65 |/ 67 |/
66 o 1 "1: add bar quux; copy foo to copied" files: bar copied quux 68 o 1 "1: add bar quux; copy foo to copied" files: bar copied dir/file4 quux
67 | 69 |
68 o 0 "0: add foo baz dir/" files: baz dir/file dir/file2 dir/subdir/file3 dir/subdir/file4 foo 70 o 0 "0: add foo baz dir/" files: baz dir/file dir/file2 dir/file3 dir/subdir/file3 dir/subdir/file4 foo
69 71
70 72
71 final file versions in this repo: 73 final file versions in this repo:
72 74
73 $ hg manifest --debug 75 $ hg manifest --debug
74 9463f52fe115e377cf2878d4fc548117211063f2 644 bar 76 9463f52fe115e377cf2878d4fc548117211063f2 644 bar
75 94c1be4dfde2ee8d78db8bbfcf81210813307c3d 644 baz 77 94c1be4dfde2ee8d78db8bbfcf81210813307c3d 644 baz
76 7711d36246cc83e61fb29cd6d4ef394c63f1ceaf 644 copied 78 7711d36246cc83e61fb29cd6d4ef394c63f1ceaf 644 copied
77 3e20847584beff41d7cd16136b7331ab3d754be0 644 dir/file 79 3e20847584beff41d7cd16136b7331ab3d754be0 644 dir/file
78 75e6d3f8328f5f6ace6bf10b98df793416a09dca 644 dir/file2 80 75e6d3f8328f5f6ace6bf10b98df793416a09dca 644 dir/file2
81 e96dce0bc6a217656a3a410e5e6bec2c4f42bf7c 644 dir/file3
82 6edd55f559cdce67132b12ca09e09cee08b60442 644 dir/file4
79 5fe139720576e18e34bcc9f79174db8897c8afe9 644 dir/subdir/file3 83 5fe139720576e18e34bcc9f79174db8897c8afe9 644 dir/subdir/file3
80 57a1c1511590f3de52874adfa04effe8a77d64af 644 dir/subdir/file4 84 57a1c1511590f3de52874adfa04effe8a77d64af 644 dir/subdir/file4
81 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo 85 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo
82 bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644 quux 86 bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644 quux
83 $ hg debugrename copied 87 $ hg debugrename copied
232 > rename foo foo2 236 > rename foo foo2
233 > rename copied copied2 237 > rename copied copied2
234 > exclude dir/subdir 238 > exclude dir/subdir
235 > include dir/subdir/file3 239 > include dir/subdir/file3
236 > EOF 240 > EOF
237 $ hg -q convert --filemap renames.fmap --datesort source renames.repo 241 $ rm source/.hg/store/data/dir/file3.i
242 $ rm source/.hg/store/data/dir/file4.i
243 $ hg -q convert --filemap renames.fmap --datesort source dummydest
244 abort: data/dir/file3.i@e96dce0bc6a2: no match found!
245 [255]
246 $ hg -q convert --filemap renames.fmap --datesort --config convert.hg.ignoreerrors=1 source renames.repo
247 ignoring: data/dir/file3.i@e96dce0bc6a2: no match found
248 ignoring: data/dir/file4.i@6edd55f559cd: no match found
238 $ hg up -q -R renames.repo 249 $ hg up -q -R renames.repo
239 $ glog -R renames.repo 250 $ glog -R renames.repo
240 @ 4 "8: change foo" files: foo2 251 @ 4 "8: change foo" files: foo2
241 | 252 |
242 o 3 "6: change foo baz" files: foo2 253 o 3 "6: change foo baz" files: foo2