Mercurial > hg
annotate tests/test-convert-hg-startrev.out @ 8849:80cc4b1a62d0
compare grep result between target and its parent
I found that typical case is that grep target is added at (*) revision
in the tree shown below.
+--- 1(*) --- 3
0
+--- 2 ------ 4
Now, I expect 'hg grep --all' to show only rev:1 which is first
appearance of target line.
But 'hg grep --all' will tell:
target line dis-appeared at 3 => 4
target line appeared at 2 => 3
target line dis-appeared at 1 => 2
target line appeared at 0 => 1
because current 'hg grep' implementation compares not between target
revision and its parent, but between neighbor revisions in walkthrough
order.
I checked performance of this patch by "hg grep --follow --all
walkchangerevs" on whole Mercurial repo, and patched version could
complete as fast as un-patched one.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 19 May 2009 16:49:54 +0900 |
parents | bcd364b247ba |
children |
rev | line source |
---|---|
6885
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 merging a and e to e |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
3 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
4 (branch merge, don't forget to commit) |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
5 % convert from null revision |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
6 initializing destination empty repository |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
7 scanning source... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
8 sorting... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 converting... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 % convert from zero revision |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 initializing destination full repository |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
12 scanning source... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
13 sorting... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
14 converting... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
15 5 0: add a b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
16 4 1: add c |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
17 3 2: copy e from a, change b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
18 2 3: change a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
19 1 4: merge 2 and 3, copy d from b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
20 0 5: change a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
21 o 5 "5: change a" files: a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
22 | |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
23 o 4 "4: merge 2 and 3, copy d from b" files: d e |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
24 |\ |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 | o 3 "3: change a" files: a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
26 | | |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
27 o | 2 "2: copy e from a, change b" files: b e |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
28 | | |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
29 o | 1 "1: add c" files: c |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
30 |/ |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
31 o 0 "0: add a b" files: a b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
32 |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
33 % convert from merge parent |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
34 initializing destination conv1 repository |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
35 scanning source... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
36 sorting... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
37 converting... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
38 3 1: add c |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
39 2 2: copy e from a, change b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
40 1 4: merge 2 and 3, copy d from b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
41 0 5: change a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
42 o 3 "5: change a" files: a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
43 | |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
44 o 2 "4: merge 2 and 3, copy d from b" files: a d e |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
45 | |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
46 o 1 "2: copy e from a, change b" files: b e |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
47 | |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
48 o 0 "1: add c" files: a b c |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
49 |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
50 % check copy preservation |
7815
bcd364b247ba
convert: change hg.saverev default to False
Matt Mackall <mpm@selenic.com>
parents:
6885
diff
changeset
|
51 changeset: 2:d67b1d48a835 |
6885
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
52 user: test |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
53 date: Thu Jan 01 00:00:04 1970 +0000 |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
54 summary: 4: merge 2 and 3, copy d from b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
55 |
7815
bcd364b247ba
convert: change hg.saverev default to False
Matt Mackall <mpm@selenic.com>
parents:
6885
diff
changeset
|
56 changeset: 1:462c431cf47d |
6885
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
57 user: test |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
58 date: Thu Jan 01 00:00:02 1970 +0000 |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
59 summary: 2: copy e from a, change b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
60 |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
61 % check copy removal on missing parent |
7815
bcd364b247ba
convert: change hg.saverev default to False
Matt Mackall <mpm@selenic.com>
parents:
6885
diff
changeset
|
62 changeset: 2:d67b1d48a835 |
6885
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
63 user: test |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
64 date: Thu Jan 01 00:00:04 1970 +0000 |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
65 summary: 4: merge 2 and 3, copy d from b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
66 |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
67 a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
68 a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
69 a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
70 b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
71 b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
72 % convert from merge |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
73 initializing destination conv4 repository |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
74 scanning source... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
75 sorting... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
76 converting... |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
77 1 4: merge 2 and 3, copy d from b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
78 0 5: change a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
79 o 1 "5: change a" files: a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
80 | |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
81 o 0 "4: merge 2 and 3, copy d from b" files: a b c d e |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
82 |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
83 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
84 a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
85 a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
86 a |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
87 b |
6e253aa04ff7
convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
88 b |