Mercurial > hg
annotate tests/test-glog @ 11733:b43cfaf571d6
Merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 02 Aug 2010 10:55:51 -0500 |
parents | 25430ff23cfa |
children |
rev | line source |
---|---|
4344 | 1 #!/bin/sh |
2 | |
3 # @ (34) head | |
4 # | | |
5 # | o (33) head | |
6 # | | | |
7 # o | (32) expand | |
8 # |\ \ | |
9 # | o \ (31) expand | |
10 # | |\ \ | |
11 # | | o \ (30) expand | |
12 # | | |\ \ | |
13 # | | | o | (29) regular commit | |
14 # | | | | | | |
15 # | | o | | (28) merge zero known | |
16 # | | |\ \ \ | |
17 # o | | | | | (27) collapse | |
18 # |/ / / / / | |
19 # | | o---+ (26) merge one known; far right | |
20 # | | | | | | |
21 # +---o | | (25) merge one known; far left | |
22 # | | | | | | |
23 # | | o | | (24) merge one known; immediate right | |
24 # | | |\| | | |
25 # | | o | | (23) merge one known; immediate left | |
26 # | |/| | | | |
27 # +---o---+ (22) merge two known; one far left, one far right | |
28 # | | / / | |
29 # o | | | (21) expand | |
30 # |\ \ \ \ | |
31 # | o---+-+ (20) merge two known; two far right | |
32 # | / / / | |
33 # o | | | (19) expand | |
34 # |\ \ \ \ | |
35 # +---+---o (18) merge two known; two far left | |
36 # | | | | | |
37 # | o | | (17) expand | |
38 # | |\ \ \ | |
39 # | | o---+ (16) merge two known; one immediate right, one near right | |
40 # | | |/ / | |
41 # o | | | (15) expand | |
42 # |\ \ \ \ | |
43 # | o-----+ (14) merge two known; one immediate right, one far right | |
44 # | |/ / / | |
45 # o | | | (13) expand | |
46 # |\ \ \ \ | |
47 # +---o | | (12) merge two known; one immediate right, one far left | |
48 # | | |/ / | |
49 # | o | | (11) expand | |
50 # | |\ \ \ | |
51 # | | o---+ (10) merge two known; one immediate left, one near right | |
52 # | |/ / / | |
53 # o | | | (9) expand | |
54 # |\ \ \ \ | |
55 # | o-----+ (8) merge two known; one immediate left, one far right | |
56 # |/ / / / | |
57 # o | | | (7) expand | |
58 # |\ \ \ \ | |
59 # +---o | | (6) merge two known; one immediate left, one far left | |
60 # | |/ / / | |
61 # | o | | (5) expand | |
62 # | |\ \ \ | |
63 # | | o | | (4) merge two known; one immediate left, one immediate right | |
64 # | |/|/ / | |
65 # | o / / (3) collapse | |
66 # |/ / / | |
67 # o / / (2) collapse | |
68 # |/ / | |
69 # o / (1) collapse | |
70 # |/ | |
71 # o (0) root | |
72 | |
7429
dbc40381620e
tests: Skip tests if they will fail because of outer repo
Mads Kiilerich <mads@kiilerich.com>
parents:
7383
diff
changeset
|
73 "$TESTDIR/hghave" no-outer-repo || exit 80 |
dbc40381620e
tests: Skip tests if they will fail because of outer repo
Mads Kiilerich <mads@kiilerich.com>
parents:
7383
diff
changeset
|
74 |
4344 | 75 set -e |
76 | |
77 commit() | |
78 { | |
79 rev=$1 | |
80 msg=$2 | |
81 shift 2 | |
82 if [ "$#" -gt 0 ]; then | |
83 hg debugsetparents "$@" | |
84 fi | |
8397
613ac2856535
remove deprecated rawcommit
Matt Mackall <mpm@selenic.com>
parents:
8268
diff
changeset
|
85 echo $rev > a |
613ac2856535
remove deprecated rawcommit
Matt Mackall <mpm@selenic.com>
parents:
8268
diff
changeset
|
86 hg commit -Aqd "$rev 0" -m "($rev) $msg" |
4344 | 87 } |
88 | |
89 echo "[extensions]" >> $HGRCPATH | |
90 echo "graphlog=" >> $HGRCPATH | |
91 | |
92 echo % init | |
93 hg init repo | |
94 | |
95 cd repo | |
96 | |
97 echo % empty repo | |
98 hg glog | |
99 | |
100 echo % building tree | |
101 commit 0 "root" | |
102 commit 1 "collapse" 0 | |
103 commit 2 "collapse" 1 | |
104 commit 3 "collapse" 2 | |
105 commit 4 "merge two known; one immediate left, one immediate right" 1 3 | |
106 commit 5 "expand" 3 4 | |
107 commit 6 "merge two known; one immediate left, one far left" 2 5 | |
108 commit 7 "expand" 2 5 | |
109 commit 8 "merge two known; one immediate left, one far right" 0 7 | |
110 commit 9 "expand" 7 8 | |
111 commit 10 "merge two known; one immediate left, one near right" 0 6 | |
112 commit 11 "expand" 6 10 | |
113 commit 12 "merge two known; one immediate right, one far left" 1 9 | |
114 commit 13 "expand" 9 11 | |
115 commit 14 "merge two known; one immediate right, one far right" 0 12 | |
116 commit 15 "expand" 13 14 | |
117 commit 16 "merge two known; one immediate right, one near right" 0 1 | |
118 commit 17 "expand" 12 16 | |
119 commit 18 "merge two known; two far left" 1 15 | |
120 commit 19 "expand" 15 17 | |
121 commit 20 "merge two known; two far right" 0 18 | |
122 commit 21 "expand" 19 20 | |
123 commit 22 "merge two known; one far left, one far right" 18 21 | |
124 commit 23 "merge one known; immediate left" 1 22 | |
125 commit 24 "merge one known; immediate right" 0 23 | |
126 commit 25 "merge one known; far left" 21 24 | |
127 commit 26 "merge one known; far right" 18 25 | |
128 commit 27 "collapse" 21 | |
129 commit 28 "merge zero known" 1 26 | |
130 commit 29 "regular commit" 0 | |
131 commit 30 "expand" 28 29 | |
132 commit 31 "expand" 21 30 | |
133 commit 32 "expand" 27 31 | |
134 commit 33 "head" 18 | |
135 commit 34 "head" 32 | |
136 | |
137 echo % glog -q | |
138 hg glog -q | |
139 | |
140 echo % glog | |
141 hg glog | |
4735
8d4fac0a9df7
Make hg glog abort if unused arguments are given.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4344
diff
changeset
|
142 |
5939
56e8a54bf71d
graphlog: add test for filelog graph
Steve Borho <steve@borho.org>
parents:
4735
diff
changeset
|
143 echo % file glog |
8397
613ac2856535
remove deprecated rawcommit
Matt Mackall <mpm@selenic.com>
parents:
8268
diff
changeset
|
144 hg glog a |
5939
56e8a54bf71d
graphlog: add test for filelog graph
Steve Borho <steve@borho.org>
parents:
4735
diff
changeset
|
145 |
4735
8d4fac0a9df7
Make hg glog abort if unused arguments are given.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4344
diff
changeset
|
146 echo % unused arguments |
5939
56e8a54bf71d
graphlog: add test for filelog graph
Steve Borho <steve@borho.org>
parents:
4735
diff
changeset
|
147 hg glog -q foo bar || echo failed |
6969
d76f64cd4cb2
graphlog: fix calls from outside the repository (issue1285)
Patrick Mezard <pmezard@gmail.com>
parents:
6385
diff
changeset
|
148 |
11448
25430ff23cfa
glog: fix crash on empty revision range
Eric Eisner <ede@mit.edu>
parents:
10084
diff
changeset
|
149 echo % empty revision range - display nothing |
25430ff23cfa
glog: fix crash on empty revision range
Eric Eisner <ede@mit.edu>
parents:
10084
diff
changeset
|
150 hg glog -r 1..0 |
25430ff23cfa
glog: fix crash on empty revision range
Eric Eisner <ede@mit.edu>
parents:
10084
diff
changeset
|
151 |
6969
d76f64cd4cb2
graphlog: fix calls from outside the repository (issue1285)
Patrick Mezard <pmezard@gmail.com>
parents:
6385
diff
changeset
|
152 echo % from outer space |
d76f64cd4cb2
graphlog: fix calls from outside the repository (issue1285)
Patrick Mezard <pmezard@gmail.com>
parents:
6385
diff
changeset
|
153 cd .. |
d76f64cd4cb2
graphlog: fix calls from outside the repository (issue1285)
Patrick Mezard <pmezard@gmail.com>
parents:
6385
diff
changeset
|
154 hg glog -l1 repo |
8397
613ac2856535
remove deprecated rawcommit
Matt Mackall <mpm@selenic.com>
parents:
8268
diff
changeset
|
155 hg glog -l1 repo/a |
6969
d76f64cd4cb2
graphlog: fix calls from outside the repository (issue1285)
Patrick Mezard <pmezard@gmail.com>
parents:
6385
diff
changeset
|
156 hg glog -l1 repo/missing |
d76f64cd4cb2
graphlog: fix calls from outside the repository (issue1285)
Patrick Mezard <pmezard@gmail.com>
parents:
6385
diff
changeset
|
157 |
7383
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
158 echo % file log with revs != cset revs |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
159 hg init flog |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
160 cd flog |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
161 echo one >one |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
162 hg add one |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
163 hg commit -mone |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
164 echo two >two |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
165 hg add two |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
166 hg commit -mtwo |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
167 echo more >two |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
168 hg commit -mmore |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
169 hg glog two |
b501c7f3c2ad
graphlog: fix regression with filelogs introduced by 7bc62ebe7693
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
6969
diff
changeset
|
170 |
9728
acb1c59b4514
tests: glog with style and file parameter (issue1896)
Joel Rosdahl <joel@rosdahl.net>
parents:
9176
diff
changeset
|
171 echo "% file log with explicit style (issue 1896)" |
acb1c59b4514
tests: glog with style and file parameter (issue1896)
Joel Rosdahl <joel@rosdahl.net>
parents:
9176
diff
changeset
|
172 hg glog --style=default one |
acb1c59b4514
tests: glog with style and file parameter (issue1896)
Joel Rosdahl <joel@rosdahl.net>
parents:
9176
diff
changeset
|
173 |
7714
f6cee47c0907
graphlog: some testing for incoming and outgoing graphs
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7429
diff
changeset
|
174 echo % incoming and outgoing |
f6cee47c0907
graphlog: some testing for incoming and outgoing graphs
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7429
diff
changeset
|
175 cd .. |
f6cee47c0907
graphlog: some testing for incoming and outgoing graphs
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7429
diff
changeset
|
176 hg clone -U -r31 repo repo2 |
f6cee47c0907
graphlog: some testing for incoming and outgoing graphs
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7429
diff
changeset
|
177 cd repo2 |
9176
d12e9b40e444
graphlog: fix incoming with local repo (issue1731)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8397
diff
changeset
|
178 hg incoming --graph ../repo |
7714
f6cee47c0907
graphlog: some testing for incoming and outgoing graphs
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7429
diff
changeset
|
179 cd .. |
f6cee47c0907
graphlog: some testing for incoming and outgoing graphs
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7429
diff
changeset
|
180 hg -R repo outgoing --graph repo2 |
10084
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
181 |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
182 cd repo |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
183 echo % file + limit with revs != cset revs |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
184 touch b |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
185 hg ci -Aqm0 |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
186 # this used to show only one cset |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
187 hg glog -l2 a |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
188 |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
189 echo "% file + limit + -ra:b, (b - a) < limit" |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
190 hg glog -l3000 -r32:tip a |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
191 |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
192 echo "% file + limit + -ra:b, b < tip" |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
193 hg glog -l1 -r32:34 a |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
194 |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
195 echo "% file + limit + -ra:b, b < tip, (b - a) < limit" |
4c844f16bf39
graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9728
diff
changeset
|
196 hg glog -l10 -r33:34 a |