annotate tests/test-annotate.t @ 32565:5313d98089f5

copies: introduce getdstfctx Previously `c2` may had an incorrect linkrev because getsrcfctx set wrong _descendantrev. getsrcfctx() sets descendant rev equals to srcctx.rev() (see _makegetfctx()), but for `c2` descendant rev should be dstctx. While we were lucky it didn't broke copytracing it made it significantly slower in some cases. Besides it broke some external extensions, for example remotefilelog.
author Stanislau Hlebik <stash@fb.com>
date Mon, 29 May 2017 06:06:13 -0700
parents 1df80eff24cf
children 7a209737f01c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
1 $ HGMERGE=true; export HGMERGE
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
2
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
3 init
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
4
15528
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
5 $ hg init repo
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
6 $ cd repo
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
7
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
8 commit
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
9
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
10 $ echo 'a' > a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
11 $ hg ci -A -m test -u nobody -d '1 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
12 adding a
4365
46280c004f22 change tests to use simplemerge by default
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3405
diff changeset
13
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
14 annotate -c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
15
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
16 $ hg annotate -c a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
17 8435f90966e4: a
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
18
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
19 annotate -cl
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
20
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
21 $ hg annotate -cl a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
22 8435f90966e4:1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
23
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
24 annotate -d
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
25
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
26 $ hg annotate -d a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
27 Thu Jan 01 00:00:01 1970 +0000: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
28
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
29 annotate -n
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
30
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
31 $ hg annotate -n a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
32 0: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
33
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
34 annotate -nl
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
35
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
36 $ hg annotate -nl a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
37 0:1: a
4857
2192001e4bb4 Add --line-number option to hg annotate (issue506)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4659
diff changeset
38
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
39 annotate -u
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
40
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
41 $ hg annotate -u a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
42 nobody: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
43
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
44 annotate -cdnu
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
45
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
46 $ hg annotate -cdnu a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
47 nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
48
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
49 annotate -cdnul
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
50
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
51 $ hg annotate -cdnul a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
52 nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000:1: a
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
53
22480
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
54 annotate (JSON)
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
55
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
56 $ hg annotate -Tjson a
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
57 [
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
58 {
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
59 "line": "a\n",
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
60 "rev": 0
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
61 }
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
62 ]
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
63
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
64 $ hg annotate -Tjson -cdfnul a
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
65 [
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
66 {
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
67 "date": [1.0, 0],
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
68 "file": "a",
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
69 "line": "a\n",
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
70 "line_number": 1,
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
71 "node": "8435f90966e442695d2ded29fdade2bac5ad8065",
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
72 "rev": 0,
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
73 "user": "nobody"
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
74 }
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
75 ]
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
76
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
77 $ cat <<EOF >>a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
78 > a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
79 > a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
80 > EOF
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
81 $ hg ci -ma1 -d '1 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
82 $ hg cp a b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
83 $ hg ci -mb -d '1 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
84 $ cat <<EOF >> b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
85 > b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
86 > b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
87 > b6
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
88 > EOF
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
89 $ hg ci -mb2 -d '2 0'
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
90
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
91 annotate -n b
3172
5c93dd0ae413 Refactor annotate copy support.
Brendan Cully <brendan@kublai.com>
parents: 2925
diff changeset
92
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
93 $ hg annotate -n b
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
94 0: a
30431
8c0c75aa3ff4 bdiff: give slight preference to longest matches in the middle of the B side
Mads Kiilerich <madski@unity3d.com>
parents: 29861
diff changeset
95 1: a
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
96 1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
97 3: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
98 3: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
99 3: b6
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
100
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
101 annotate --no-follow b
4857
2192001e4bb4 Add --line-number option to hg annotate (issue506)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4659
diff changeset
102
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
103 $ hg annotate --no-follow b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
104 2: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
105 2: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
106 2: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
107 3: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
108 3: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
109 3: b6
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
110
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
111 annotate -nl b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
112
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
113 $ hg annotate -nl b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
114 0:1: a
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
115 1:2: a
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
116 1:3: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
117 3:4: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
118 3:5: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
119 3:6: b6
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
120
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
121 annotate -nf b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
122
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
123 $ hg annotate -nf b
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
124 0 a: a
30431
8c0c75aa3ff4 bdiff: give slight preference to longest matches in the middle of the B side
Mads Kiilerich <madski@unity3d.com>
parents: 29861
diff changeset
125 1 a: a
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
126 1 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
127 3 b: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
128 3 b: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
129 3 b: b6
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
130
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
131 annotate -nlf b
3172
5c93dd0ae413 Refactor annotate copy support.
Brendan Cully <brendan@kublai.com>
parents: 2925
diff changeset
132
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
133 $ hg annotate -nlf b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
134 0 a:1: a
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
135 1 a:2: a
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
136 1 a:3: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
137 3 b:4: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
138 3 b:5: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
139 3 b:6: b6
3172
5c93dd0ae413 Refactor annotate copy support.
Brendan Cully <brendan@kublai.com>
parents: 2925
diff changeset
140
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
141 $ hg up -C 2
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
142 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
143 $ cat <<EOF >> b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
144 > b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
145 > c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
146 > b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
147 > EOF
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
148 $ hg ci -mb2.1 -d '2 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
149 created new head
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
150 $ hg merge
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
151 merging b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
152 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
153 (branch merge, don't forget to commit)
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
154 $ hg ci -mmergeb -d '3 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
155
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
156 annotate after merge
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
157
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
158 $ hg annotate -nf b
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
159 0 a: a
30431
8c0c75aa3ff4 bdiff: give slight preference to longest matches in the middle of the B side
Mads Kiilerich <madski@unity3d.com>
parents: 29861
diff changeset
160 1 a: a
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
161 1 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
162 3 b: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
163 4 b: c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
164 3 b: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
165
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
166 annotate after merge with -l
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
167
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
168 $ hg annotate -nlf b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
169 0 a:1: a
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
170 1 a:2: a
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
171 1 a:3: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
172 3 b:4: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
173 4 b:5: c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
174 3 b:5: b5
3172
5c93dd0ae413 Refactor annotate copy support.
Brendan Cully <brendan@kublai.com>
parents: 2925
diff changeset
175
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
176 $ hg up -C 1
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
177 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
178 $ hg cp a b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
179 $ cat <<EOF > b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
180 > a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
181 > z
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
182 > a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
183 > EOF
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
184 $ hg ci -mc -d '3 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
185 created new head
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
186 $ hg merge
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
187 merging b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
188 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
189 (branch merge, don't forget to commit)
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
190 $ cat <<EOF >> b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
191 > b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
192 > c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
193 > b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
194 > EOF
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
195 $ echo d >> b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
196 $ hg ci -mmerge2 -d '4 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
197
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
198 annotate after rename merge
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
199
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
200 $ hg annotate -nf b
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
201 0 a: a
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
202 6 b: z
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
203 1 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
204 3 b: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
205 4 b: c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
206 3 b: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
207 7 b: d
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
208
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
209 annotate after rename merge with -l
3405
2e1d8b238b6c Test annotate using named rev instead of linkrev
Brendan Cully <brendan@kublai.com>
parents: 3202
diff changeset
210
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
211 $ hg annotate -nlf b
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
212 0 a:1: a
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
213 6 b:2: z
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
214 1 a:3: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
215 3 b:4: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
216 4 b:5: c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
217 3 b:5: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
218 7 b:7: d
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
219
32486
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
220 --skip nothing (should be the same as no --skip at all)
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
221
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
222 $ hg annotate -nlf b --skip '1::0'
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
223 0 a:1: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
224 6 b:2: z
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
225 1 a:3: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
226 3 b:4: b4
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
227 4 b:5: c
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
228 3 b:5: b5
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
229 7 b:7: d
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
230
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
231 --skip a modified line
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
232
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
233 $ hg annotate -nlf b --skip 6
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
234 0 a:1: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
235 1 a:2: z
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
236 1 a:3: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
237 3 b:4: b4
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
238 4 b:5: c
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
239 3 b:5: b5
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
240 7 b:7: d
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
241
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
242 --skip added lines (and test multiple skip)
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
243
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
244 $ hg annotate -nlf b --skip 3
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
245 0 a:1: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
246 6 b:2: z
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
247 1 a:3: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
248 1 a:3: b4
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
249 4 b:5: c
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
250 1 a:3: b5
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
251 7 b:7: d
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
252
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
253 $ hg annotate -nlf b --skip 4
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
254 0 a:1: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
255 6 b:2: z
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
256 1 a:3: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
257 3 b:4: b4
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
258 1 a:3: c
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
259 3 b:5: b5
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
260 7 b:7: d
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
261
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
262 $ hg annotate -nlf b --skip 3 --skip 4
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
263 0 a:1: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
264 6 b:2: z
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
265 1 a:3: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
266 1 a:3: b4
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
267 1 a:3: c
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
268 1 a:3: b5
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
269 7 b:7: d
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
270
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
271 $ hg annotate -nlf b --skip 'merge()'
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
272 0 a:1: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
273 6 b:2: z
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
274 1 a:3: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
275 3 b:4: b4
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
276 4 b:5: c
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
277 3 b:5: b5
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
278 3 b:5: d
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
279
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
280 --skip everything -- use the revision the file was introduced in
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
281
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
282 $ hg annotate -nlf b --skip 'all()'
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
283 0 a:1: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
284 0 a:1: z
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
285 0 a:1: a
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
286 0 a:1: b4
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
287 0 a:1: c
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
288 0 a:1: b5
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
289 0 a:1: d
1df80eff24cf annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com>
parents: 32085
diff changeset
290
14358
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
291 Issue2807: alignment of line numbers with -l
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
292
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
293 $ echo more >> b
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
294 $ hg ci -mmore -d '5 0'
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
295 $ echo more >> b
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
296 $ hg ci -mmore -d '6 0'
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
297 $ echo more >> b
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
298 $ hg ci -mmore -d '7 0'
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
299 $ hg annotate -nlf b
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
300 0 a: 1: a
14358
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
301 6 b: 2: z
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
302 1 a: 3: a
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
303 3 b: 4: b4
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
304 4 b: 5: c
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
305 3 b: 5: b5
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
306 7 b: 7: d
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
307 8 b: 8: more
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
308 9 b: 9: more
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
309 10 b:10: more
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
310
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
311 linkrev vs rev
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
312
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
313 $ hg annotate -r tip -n a
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
314 0: a
30431
8c0c75aa3ff4 bdiff: give slight preference to longest matches in the middle of the B side
Mads Kiilerich <madski@unity3d.com>
parents: 29861
diff changeset
315 1: a
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
316 1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
317
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
318 linkrev vs rev with -l
4639
c7371aa0c153 test-annotate: add a test for issue 589.
Patrick Mezard <pmezard@gmail.com>
parents: 3405
diff changeset
319
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
320 $ hg annotate -r tip -nl a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
321 0:1: a
30432
3633403888ae bdiff: give slight preference to appending lines
Mads Kiilerich <madski@unity3d.com>
parents: 30431
diff changeset
322 1:2: a
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
323 1:3: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
324
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 11852
diff changeset
325 Issue589: "undelete" sequence leads to crash
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
326
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
327 annotate was crashing when trying to --follow something
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
328
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
329 like A -> B -> A
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
330
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
331 generate ABA rename configuration
4639
c7371aa0c153 test-annotate: add a test for issue 589.
Patrick Mezard <pmezard@gmail.com>
parents: 3405
diff changeset
332
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
333 $ echo foo > foo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
334 $ hg add foo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
335 $ hg ci -m addfoo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
336 $ hg rename foo bar
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
337 $ hg ci -m renamefoo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
338 $ hg rename bar foo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
339 $ hg ci -m renamebar
4639
c7371aa0c153 test-annotate: add a test for issue 589.
Patrick Mezard <pmezard@gmail.com>
parents: 3405
diff changeset
340
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
341 annotate after ABA with follow
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
342
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
343 $ hg annotate --follow foo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
344 foo: foo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
345
13697
eaee75036725 annotate: catch nonexistent files using match.bad callback (issue1590)
Matt Mackall <mpm@selenic.com>
parents: 12399
diff changeset
346 missing file
eaee75036725 annotate: catch nonexistent files using match.bad callback (issue1590)
Matt Mackall <mpm@selenic.com>
parents: 12399
diff changeset
347
eaee75036725 annotate: catch nonexistent files using match.bad callback (issue1590)
Matt Mackall <mpm@selenic.com>
parents: 12399
diff changeset
348 $ hg ann nosuchfile
14358
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
349 abort: nosuchfile: no such file in rev e9e6b4fa872f
13697
eaee75036725 annotate: catch nonexistent files using match.bad callback (issue1590)
Matt Mackall <mpm@selenic.com>
parents: 12399
diff changeset
350 [255]
15528
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
351
15829
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
352 annotate file without '\n' on last line
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
353
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
354 $ printf "" > c
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
355 $ hg ci -A -m test -u nobody -d '1 0'
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
356 adding c
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
357 $ hg annotate c
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
358 $ printf "a\nb" > c
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
359 $ hg ci -m test
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
360 $ hg annotate c
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
361 [0-9]+: a (re)
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
362 [0-9]+: b (re)
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
363
18993
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
364 Issue3841: check annotation of the file of which filelog includes
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
365 merging between the revision and its ancestor
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
366
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
367 to reproduce the situation with recent Mercurial, this script uses (1)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
368 "hg debugsetparents" to merge without ancestor check by "hg merge",
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
369 and (2) the extension to allow filelog merging between the revision
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
370 and its ancestor by overriding "repo._filecommit".
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
371
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
372 $ cat > ../legacyrepo.py <<EOF
26587
56b2bcea2529 error: get Abort from 'error' instead of 'util'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24817
diff changeset
373 > from mercurial import node, error
18993
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
374 > def reposetup(ui, repo):
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
375 > class legacyrepo(repo.__class__):
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
376 > def _filecommit(self, fctx, manifest1, manifest2,
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
377 > linkrev, tr, changelist):
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
378 > fname = fctx.path()
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
379 > text = fctx.data()
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
380 > flog = self.file(fname)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
381 > fparent1 = manifest1.get(fname, node.nullid)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
382 > fparent2 = manifest2.get(fname, node.nullid)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
383 > meta = {}
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
384 > copy = fctx.renamed()
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
385 > if copy and copy[0] != fname:
26587
56b2bcea2529 error: get Abort from 'error' instead of 'util'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24817
diff changeset
386 > raise error.Abort('copying is not supported')
18993
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
387 > if fparent2 != node.nullid:
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
388 > changelist.append(fname)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
389 > return flog.add(text, meta, tr, linkrev,
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
390 > fparent1, fparent2)
26587
56b2bcea2529 error: get Abort from 'error' instead of 'util'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24817
diff changeset
391 > raise error.Abort('only merging is supported')
18993
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
392 > repo.__class__ = legacyrepo
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
393 > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
394
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
395 $ cat > baz <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
396 > 1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
397 > 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
398 > 3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
399 > 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
400 > 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
401 > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
402 $ hg add baz
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
403 $ hg commit -m "baz:0"
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
404
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
405 $ cat > baz <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
406 > 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
407 > 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
408 > 3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
409 > 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
410 > 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
411 > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
412 $ hg commit -m "baz:1"
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
413
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
414 $ cat > baz <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
415 > 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
416 > 2 baz:2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
417 > 3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
418 > 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
419 > 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
420 > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
421 $ hg debugsetparents 17 17
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
422 $ hg --config extensions.legacyrepo=../legacyrepo.py commit -m "baz:2"
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
423 $ hg debugindexdot .hg/store/data/baz.i
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
424 digraph G {
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
425 -1 -> 0
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
426 0 -> 1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
427 1 -> 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
428 1 -> 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
429 }
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
430 $ hg annotate baz
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
431 17: 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
432 18: 2 baz:2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
433 16: 3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
434 16: 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
435 16: 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
436
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
437 $ cat > baz <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
438 > 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
439 > 2 baz:2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
440 > 3 baz:3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
441 > 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
442 > 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
443 > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
444 $ hg commit -m "baz:3"
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
445
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
446 $ cat > baz <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
447 > 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
448 > 2 baz:2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
449 > 3 baz:3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
450 > 4 baz:4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
451 > 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
452 > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
453 $ hg debugsetparents 19 18
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
454 $ hg --config extensions.legacyrepo=../legacyrepo.py commit -m "baz:4"
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
455 $ hg debugindexdot .hg/store/data/baz.i
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
456 digraph G {
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
457 -1 -> 0
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
458 0 -> 1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
459 1 -> 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
460 1 -> 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
461 2 -> 3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
462 3 -> 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
463 2 -> 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
464 }
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
465 $ hg annotate baz
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
466 17: 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
467 18: 2 baz:2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
468 19: 3 baz:3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
469 20: 4 baz:4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
470 16: 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
471
24421
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
472 annotate clean file
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
473
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
474 $ hg annotate -ncr "wdir()" foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
475 11 472b18db256d : foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
476
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
477 annotate modified file
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
478
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
479 $ echo foofoo >> foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
480 $ hg annotate -r "wdir()" foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
481 11 : foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
482 20+: foofoo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
483
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
484 $ hg annotate -cr "wdir()" foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
485 472b18db256d : foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
486 b6bedd5477e7+: foofoo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
487
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
488 $ hg annotate -ncr "wdir()" foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
489 11 472b18db256d : foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
490 20 b6bedd5477e7+: foofoo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
491
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
492 $ hg annotate --debug -ncr "wdir()" foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
493 11 472b18db256d1e8282064eab4bfdaf48cbfe83cd : foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
494 20 b6bedd5477e797f25e568a6402d4697f3f895a72+: foofoo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
495
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
496 $ hg annotate -udr "wdir()" foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
497 test Thu Jan 01 00:00:00 1970 +0000: foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
498 test [A-Za-z0-9:+ ]+: foofoo (re)
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
499
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
500 $ hg annotate -ncr "wdir()" -Tjson foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
501 [
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
502 {
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
503 "line": "foo\n",
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
504 "node": "472b18db256d1e8282064eab4bfdaf48cbfe83cd",
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
505 "rev": 11
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
506 },
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
507 {
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
508 "line": "foofoo\n",
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
509 "node": null,
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
510 "rev": null
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
511 }
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
512 ]
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
513
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
514 annotate added file
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
515
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
516 $ echo bar > bar
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
517 $ hg add bar
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
518 $ hg annotate -ncr "wdir()" bar
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
519 20 b6bedd5477e7+: bar
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
520
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
521 annotate renamed file
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
522
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
523 $ hg rename foo renamefoo2
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
524 $ hg annotate -ncr "wdir()" renamefoo2
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
525 11 472b18db256d : foo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
526 20 b6bedd5477e7+: foofoo
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
527
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
528 annotate missing file
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
529
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
530 $ rm baz
24498
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
531 #if windows
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
532 $ hg annotate -ncr "wdir()" baz
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
533 abort: $TESTTMP\repo\baz: The system cannot find the file specified
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
534 [255]
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
535 #else
24421
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
536 $ hg annotate -ncr "wdir()" baz
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
537 abort: No such file or directory: $TESTTMP/repo/baz
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
538 [255]
24498
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
539 #endif
24421
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
540
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
541 annotate removed file
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
542
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
543 $ hg rm baz
24498
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
544 #if windows
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
545 $ hg annotate -ncr "wdir()" baz
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
546 abort: $TESTTMP\repo\baz: The system cannot find the file specified
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
547 [255]
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
548 #else
24421
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
549 $ hg annotate -ncr "wdir()" baz
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
550 abort: No such file or directory: $TESTTMP/repo/baz
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
551 [255]
24498
ab3a8ed7cf1d test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 24421
diff changeset
552 #endif
24421
77881cade20e annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org>
parents: 23705
diff changeset
553
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
554 $ hg revert --all --no-backup --quiet
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
555 $ hg id -n
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
556 20
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
557
31938
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
558 Test followlines() revset; we usually check both followlines(pat, range) and
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
559 followlines(pat, range, descend=True) to make sure both give the same result
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
560 when they should.
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
561
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
562 $ echo a >> foo
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
563 $ hg ci -m 'foo: add a'
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
564 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
565 16: baz:0
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
566 19: baz:3
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
567 20: baz:4
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
568 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=20)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
569 16: baz:0
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
570 19: baz:3
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
571 20: baz:4
31938
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
572 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=19)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
573 16: baz:0
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
574 19: baz:3
31938
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
575 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=19, descend=True)'
31992
3e47a40d7a7a context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31991
diff changeset
576 19: baz:3
31938
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
577 20: baz:4
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
578 $ printf "0\n0\n" | cat - baz > baz1
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
579 $ mv baz1 baz
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
580 $ hg ci -m 'added two lines with 0'
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
581 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
582 16: baz:0
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
583 19: baz:3
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
584 20: baz:4
31998
83527d9f1f13 revset: properly parse "descend" argument of followlines()
Denis Laxalde <denis@laxalde.org>
parents: 31992
diff changeset
585 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, descend=true, startrev=19)'
31992
3e47a40d7a7a context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31991
diff changeset
586 19: baz:3
31938
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
587 20: baz:4
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
588 $ echo 6 >> baz
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
589 $ hg ci -m 'added line 8'
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
590 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
591 16: baz:0
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
592 19: baz:3
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
593 20: baz:4
31998
83527d9f1f13 revset: properly parse "descend" argument of followlines()
Denis Laxalde <denis@laxalde.org>
parents: 31992
diff changeset
594 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=19, descend=1)'
31992
3e47a40d7a7a context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31991
diff changeset
595 19: baz:3
31938
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
596 20: baz:4
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
597 $ sed 's/3/3+/' baz > baz.new
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
598 $ mv baz.new baz
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
599 $ hg ci -m 'baz:3->3+'
31998
83527d9f1f13 revset: properly parse "descend" argument of followlines()
Denis Laxalde <denis@laxalde.org>
parents: 31992
diff changeset
600 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7, descend=0)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
601 16: baz:0
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
602 19: baz:3
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
603 20: baz:4
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
604 24: baz:3->3+
31992
3e47a40d7a7a context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31991
diff changeset
605 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=17, descend=True)'
3e47a40d7a7a context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31991
diff changeset
606 19: baz:3
31938
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
607 20: baz:4
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
608 24: baz:3->3+
31998
83527d9f1f13 revset: properly parse "descend" argument of followlines()
Denis Laxalde <denis@laxalde.org>
parents: 31992
diff changeset
609 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 1:2, descend=false)'
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
610 22: added two lines with 0
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
611
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
612 file patterns are okay
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
613 $ hg log -T '{rev}: {desc}\n' -r 'followlines("path:baz", 1:2)'
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
614 22: added two lines with 0
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
615
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
616 renames are followed
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
617 $ hg mv baz qux
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
618 $ sed 's/4/4+/' qux > qux.new
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
619 $ mv qux.new qux
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
620 $ hg ci -m 'qux:4->4+'
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
621 $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
622 16: baz:0
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
623 19: baz:3
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
624 20: baz:4
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
625 24: baz:3->3+
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
626 25: qux:4->4+
31938
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
627
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
628 but are missed when following children
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
629 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7, startrev=22, descend=True)'
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
630 24: baz:3->3+
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
631
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
632 merge
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
633 $ hg up 24 --quiet
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
634 $ echo 7 >> baz
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
635 $ hg ci -m 'one more line, out of line range'
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
636 created new head
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
637 $ sed 's/3+/3-/' baz > baz.new
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
638 $ mv baz.new baz
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
639 $ hg ci -m 'baz:3+->3-'
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
640 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
641 16: baz:0
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
642 19: baz:3
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
643 20: baz:4
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
644 24: baz:3->3+
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
645 27: baz:3+->3-
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
646 $ hg merge 25
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
647 merging baz and qux to qux
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
648 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
649 (branch merge, don't forget to commit)
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
650 $ hg ci -m merge
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
651 $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
652 16: baz:0
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
653 19: baz:3
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
654 20: baz:4
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
655 24: baz:3->3+
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
656 25: qux:4->4+
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
657 27: baz:3+->3-
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
658 28: merge
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
659 $ hg up 25 --quiet
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
660 $ hg merge 27
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
661 merging qux and baz to qux
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
662 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
663 (branch merge, don't forget to commit)
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
664 $ hg ci -m 'merge from other side'
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
665 created new head
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
666 $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
667 16: baz:0
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
668 19: baz:3
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
669 20: baz:4
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
670 24: baz:3->3+
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
671 25: qux:4->4+
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
672 27: baz:3+->3-
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
673 29: merge from other side
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
674 $ hg up 24 --quiet
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
675
31938
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
676 we are missing the branch with rename when following children
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
677 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7, startrev=26, descend=True)'
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
678 27: baz:3+->3-
31938
5e3b49defbff revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30804
diff changeset
679
31955
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
680 we follow all branches in descending direction
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
681 $ hg up 23 --quiet
31955
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
682 $ sed 's/3/+3/' baz > baz.new
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
683 $ mv baz.new baz
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
684 $ hg ci -m 'baz:3->+3'
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
685 created new head
31991
55987fc8aba1 context: add an assertion checking linerange consistency in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31955
diff changeset
686 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 2:5, startrev=16, descend=True)' --graph
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
687 @ 30: baz:3->+3
31955
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
688 :
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
689 : o 27: baz:3+->3-
31955
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
690 : :
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
691 : o 24: baz:3->3+
31955
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
692 :/
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
693 o 20: baz:4
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
694 |\
31991
55987fc8aba1 context: add an assertion checking linerange consistency in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31955
diff changeset
695 | o 19: baz:3
55987fc8aba1 context: add an assertion checking linerange consistency in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31955
diff changeset
696 |/
31992
3e47a40d7a7a context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31991
diff changeset
697 o 18: baz:2
3e47a40d7a7a context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31991
diff changeset
698 :
3e47a40d7a7a context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31991
diff changeset
699 o 16: baz:0
3e47a40d7a7a context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31991
diff changeset
700 |
3e47a40d7a7a context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 31991
diff changeset
701 ~
31955
4c2c30bc38b4 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org>
parents: 31938
diff changeset
702
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
703 check error cases
32063
befefdd34cf8 context: start walking from "introrev" in blockancestors()
Denis Laxalde <denis@laxalde.org>
parents: 31998
diff changeset
704 $ hg up 24 --quiet
30754
26209cb7184e revset: parse variable-length arguments of followlines() by getargsdict()
Yuya Nishihara <yuya@tcha.org>
parents: 30719
diff changeset
705 $ hg log -r 'followlines()'
26209cb7184e revset: parse variable-length arguments of followlines() by getargsdict()
Yuya Nishihara <yuya@tcha.org>
parents: 30719
diff changeset
706 hg: parse error: followlines takes at least 1 positional arguments
26209cb7184e revset: parse variable-length arguments of followlines() by getargsdict()
Yuya Nishihara <yuya@tcha.org>
parents: 30719
diff changeset
707 [255]
26209cb7184e revset: parse variable-length arguments of followlines() by getargsdict()
Yuya Nishihara <yuya@tcha.org>
parents: 30719
diff changeset
708 $ hg log -r 'followlines(baz)'
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
709 hg: parse error: followlines requires a line range
30754
26209cb7184e revset: parse variable-length arguments of followlines() by getargsdict()
Yuya Nishihara <yuya@tcha.org>
parents: 30719
diff changeset
710 [255]
26209cb7184e revset: parse variable-length arguments of followlines() by getargsdict()
Yuya Nishihara <yuya@tcha.org>
parents: 30719
diff changeset
711 $ hg log -r 'followlines(baz, 1)'
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
712 hg: parse error: followlines expects a line range
30754
26209cb7184e revset: parse variable-length arguments of followlines() by getargsdict()
Yuya Nishihara <yuya@tcha.org>
parents: 30719
diff changeset
713 [255]
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
714 $ hg log -r 'followlines(baz, 1:2, startrev=desc("b"))'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
715 hg: parse error: followlines expects exactly one revision
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
716 [255]
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
717 $ hg log -r 'followlines("glob:*", 1:2)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
718 hg: parse error: followlines expects exactly one file
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
719 [255]
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
720 $ hg log -r 'followlines(baz, 1:)'
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
721 hg: parse error: line range bounds must be integers
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
722 [255]
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
723 $ hg log -r 'followlines(baz, :1)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
724 hg: parse error: line range bounds must be integers
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
725 [255]
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
726 $ hg log -r 'followlines(baz, x:4)'
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
727 hg: parse error: line range bounds must be integers
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
728 [255]
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
729 $ hg log -r 'followlines(baz, 5:4)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
730 hg: parse error: line range must be positive
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
731 [255]
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
732 $ hg log -r 'followlines(baz, 0:4)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
733 hg: parse error: fromline must be strictly positive
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
734 [255]
30804
4227f80f72b2 revset: abuse x:y syntax to specify line range of followlines()
Yuya Nishihara <yuya@tcha.org>
parents: 30800
diff changeset
735 $ hg log -r 'followlines(baz, 2:40)'
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
736 abort: line range exceeds file size
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
737 [255]
31998
83527d9f1f13 revset: properly parse "descend" argument of followlines()
Denis Laxalde <denis@laxalde.org>
parents: 31992
diff changeset
738 $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=[1])'
83527d9f1f13 revset: properly parse "descend" argument of followlines()
Denis Laxalde <denis@laxalde.org>
parents: 31992
diff changeset
739 hg: parse error at 43: syntax error in revset 'followlines(baz, 2:4, startrev=20, descend=[1])'
83527d9f1f13 revset: properly parse "descend" argument of followlines()
Denis Laxalde <denis@laxalde.org>
parents: 31992
diff changeset
740 [255]
83527d9f1f13 revset: properly parse "descend" argument of followlines()
Denis Laxalde <denis@laxalde.org>
parents: 31992
diff changeset
741 $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=a)'
32085
2a2744dffecf revset: add i18n comments to error messages for followlines predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32063
diff changeset
742 hg: parse error: descend argument must be a boolean
31998
83527d9f1f13 revset: properly parse "descend" argument of followlines()
Denis Laxalde <denis@laxalde.org>
parents: 31992
diff changeset
743 [255]
30719
42c75b4fa46a revset: add a followlines(file, fromline, toline[, rev]) revset
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 30432
diff changeset
744
15528
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
745 Test annotate with whitespace options
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
746
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
747 $ cd ..
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
748 $ hg init repo-ws
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
749 $ cd repo-ws
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
750 $ cat > a <<EOF
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
751 > aa
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
752 >
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
753 > b b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
754 > EOF
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
755 $ hg ci -Am "adda"
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
756 adding a
17347
2da47de36b6f check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
757 $ sed 's/EOL$//g' > a <<EOF
15528
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
758 > a a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
759 >
17347
2da47de36b6f check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
760 > EOL
15528
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
761 > b b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
762 > EOF
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
763 $ hg ci -m "changea"
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
764
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
765 Annotate with no option
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
766
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
767 $ hg annotate a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
768 1: a a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
769 0:
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
770 1:
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
771 1: b b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
772
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
773 Annotate with --ignore-space-change
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
774
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
775 $ hg annotate --ignore-space-change a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
776 1: a a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
777 1:
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
778 0:
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
779 0: b b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
780
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
781 Annotate with --ignore-all-space
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
782
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
783 $ hg annotate --ignore-all-space a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
784 0: a a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
785 0:
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
786 1:
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
787 0: b b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
788
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
789 Annotate with --ignore-blank-lines (similar to no options case)
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
790
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
791 $ hg annotate --ignore-blank-lines a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
792 1: a a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
793 0:
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
794 1:
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
795 1: b b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
796
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15829
diff changeset
797 $ cd ..
23702
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
798
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
799 Annotate with linkrev pointing to another branch
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
800 ------------------------------------------------
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
801
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
802 create history with a filerev whose linkrev points to another branch
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
803
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
804 $ hg init branchedlinkrev
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
805 $ cd branchedlinkrev
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
806 $ echo A > a
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
807 $ hg commit -Am 'contentA'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
808 adding a
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
809 $ echo B >> a
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
810 $ hg commit -m 'contentB'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
811 $ hg up --rev 'desc(contentA)'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
812 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
813 $ echo unrelated > unrelated
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
814 $ hg commit -Am 'unrelated'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
815 adding unrelated
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
816 created new head
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
817 $ hg graft -r 'desc(contentB)'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
818 grafting 1:fd27c222e3e6 "contentB"
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
819 $ echo C >> a
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
820 $ hg commit -m 'contentC'
24817
0bb98eee531d committablefilectx: propagate ancestry info to parent to fix annotation
Yuya Nishihara <yuya@tcha.org>
parents: 24498
diff changeset
821 $ echo W >> a
23702
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
822 $ hg log -G
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
823 @ changeset: 4:072f1e8df249
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
824 | tag: tip
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
825 | user: test
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
826 | date: Thu Jan 01 00:00:00 1970 +0000
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
827 | summary: contentC
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
828 |
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
829 o changeset: 3:ff38df03cc4b
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
830 | user: test
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
831 | date: Thu Jan 01 00:00:00 1970 +0000
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
832 | summary: contentB
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
833 |
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
834 o changeset: 2:62aaf3f6fc06
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
835 | parent: 0:f0932f74827e
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
836 | user: test
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
837 | date: Thu Jan 01 00:00:00 1970 +0000
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
838 | summary: unrelated
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
839 |
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
840 | o changeset: 1:fd27c222e3e6
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
841 |/ user: test
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
842 | date: Thu Jan 01 00:00:00 1970 +0000
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
843 | summary: contentB
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
844 |
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
845 o changeset: 0:f0932f74827e
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
846 user: test
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
847 date: Thu Jan 01 00:00:00 1970 +0000
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
848 summary: contentA
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
849
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
850
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
851 Annotate should list ancestor of starting revision only
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
852
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
853 $ hg annotate a
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
854 0: A
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
855 3: B
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
856 4: C
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
857
24817
0bb98eee531d committablefilectx: propagate ancestry info to parent to fix annotation
Yuya Nishihara <yuya@tcha.org>
parents: 24498
diff changeset
858 $ hg annotate a -r 'wdir()'
0bb98eee531d committablefilectx: propagate ancestry info to parent to fix annotation
Yuya Nishihara <yuya@tcha.org>
parents: 24498
diff changeset
859 0 : A
0bb98eee531d committablefilectx: propagate ancestry info to parent to fix annotation
Yuya Nishihara <yuya@tcha.org>
parents: 24498
diff changeset
860 3 : B
0bb98eee531d committablefilectx: propagate ancestry info to parent to fix annotation
Yuya Nishihara <yuya@tcha.org>
parents: 24498
diff changeset
861 4 : C
0bb98eee531d committablefilectx: propagate ancestry info to parent to fix annotation
Yuya Nishihara <yuya@tcha.org>
parents: 24498
diff changeset
862 4+: W
0bb98eee531d committablefilectx: propagate ancestry info to parent to fix annotation
Yuya Nishihara <yuya@tcha.org>
parents: 24498
diff changeset
863
23705
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
864 Even when the starting revision is the linkrev-shadowed one:
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
865
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
866 $ hg annotate a -r 3
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
867 0: A
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
868 3: B
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
869
23702
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
870 $ cd ..
29861
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
871
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
872 Issue5360: Deleted chunk in p1 of a merge changeset
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
873
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
874 $ hg init repo-5360
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
875 $ cd repo-5360
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
876 $ echo 1 > a
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
877 $ hg commit -A a -m 1
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
878 $ echo 2 >> a
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
879 $ hg commit -m 2
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
880 $ echo a > a
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
881 $ hg commit -m a
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
882 $ hg update '.^' -q
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
883 $ echo 3 >> a
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
884 $ hg commit -m 3 -q
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
885 $ hg merge 2 -q
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
886 $ cat > a << EOF
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
887 > b
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
888 > 1
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
889 > 2
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
890 > 3
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
891 > a
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
892 > EOF
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
893 $ hg resolve --mark -q
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
894 $ hg commit -m m
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
895 $ hg annotate a
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
896 4: b
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
897 0: 1
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
898 1: 2
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
899 3: 3
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
900 2: a
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
901
2f6d5c60f6fc annotate: pre-calculate the "needed" dictionary (issue5360)
Jun Wu <quark@fb.com>
parents: 26587
diff changeset
902 $ cd ..