Mercurial > evolve
comparison tests/test-evolve-obshistory-phase-divergent.t @ 3893:aab2afc2bd82
tests: add a content-divergent obshistory test
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 25 May 2018 11:48:19 +0200 |
parents | tests/test-evolve-obshistory-content-divergent.t@11b775fddda8 |
children | f7afd3a158e3 f16274729530 |
comparison
equal
deleted
inserted
replaced
3892:106c871dfebc | 3893:aab2afc2bd82 |
---|---|
1 This test file test the various messages when accessing obsolete | |
2 revisions. | |
3 | |
4 Global setup | |
5 ============ | |
6 | |
7 $ . $TESTDIR/testlib/obshistory_setup.sh | |
8 | |
9 Test output with phase-divergence | |
10 =================================== | |
11 | |
12 Test setup | |
13 ---------- | |
14 | |
15 $ hg init $TESTTMP/phase-divergence | |
16 $ cd $TESTTMP/phase-divergence | |
17 $ mkcommit ROOT | |
18 $ mkcommit A0 | |
19 $ hg amend -m "A1" | |
20 $ hg log --hidden -G | |
21 @ changeset: 2:fdf9bde5129a | |
22 | tag: tip | |
23 | parent: 0:ea207398892e | |
24 | user: test | |
25 | date: Thu Jan 01 00:00:00 1970 +0000 | |
26 | summary: A1 | |
27 | | |
28 | x changeset: 1:471f378eab4c | |
29 |/ user: test | |
30 | date: Thu Jan 01 00:00:00 1970 +0000 | |
31 | obsolete: reworded using amend as 2:fdf9bde5129a | |
32 | summary: A0 | |
33 | | |
34 o changeset: 0:ea207398892e | |
35 user: test | |
36 date: Thu Jan 01 00:00:00 1970 +0000 | |
37 summary: ROOT | |
38 | |
39 $ hg update --hidden 'desc(A0)' | |
40 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
41 updated to hidden changeset 471f378eab4c | |
42 (hidden revision '471f378eab4c' was rewritten as: fdf9bde5129a) | |
43 working directory parent is obsolete! (471f378eab4c) | |
44 (use 'hg evolve' to update to its successor: fdf9bde5129a) | |
45 $ hg phase -p . | |
46 1 new phase-divergent changesets | |
47 $ hg log --hidden -G | |
48 * changeset: 2:fdf9bde5129a | |
49 | tag: tip | |
50 | parent: 0:ea207398892e | |
51 | user: test | |
52 | date: Thu Jan 01 00:00:00 1970 +0000 | |
53 | instability: phase-divergent | |
54 | summary: A1 | |
55 | | |
56 | @ changeset: 1:471f378eab4c | |
57 |/ user: test | |
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
59 | summary: A0 | |
60 | | |
61 o changeset: 0:ea207398892e | |
62 user: test | |
63 date: Thu Jan 01 00:00:00 1970 +0000 | |
64 summary: ROOT | |
65 | |
66 Actual test | |
67 ----------- | |
68 | |
69 Check that debugobshistory on the divergent revision show both destinations | |
70 $ hg obslog --hidden 471f378eab4c --patch | |
71 @ 471f378eab4c (1) A0 | |
72 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
73 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
74 --- a/changeset-description | |
75 +++ b/changeset-description | |
76 @@ -1,1 +1,1 @@ | |
77 -A0 | |
78 +A1 | |
79 | |
80 | |
81 | |
82 Check that with all option, every changeset is shown | |
83 $ hg obslog --hidden --all 471f378eab4c --patch | |
84 * fdf9bde5129a (2) A1 | |
85 | | |
86 @ 471f378eab4c (1) A0 | |
87 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
88 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
89 --- a/changeset-description | |
90 +++ b/changeset-description | |
91 @@ -1,1 +1,1 @@ | |
92 -A0 | |
93 +A1 | |
94 | |
95 | |
96 $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool | |
97 [ | |
98 { | |
99 "markers": [ | |
100 { | |
101 "date": [ | |
102 *, (glob) | |
103 0 (glob) | |
104 ], | |
105 "effect": [ | |
106 "description" | |
107 ], | |
108 "operation": "amend", | |
109 "succnodes": [ | |
110 "fdf9bde5129a" | |
111 ], | |
112 "user": "test", | |
113 "verb": "rewritten" | |
114 } | |
115 ], | |
116 "node": "471f378eab4c", | |
117 "rev": 1, | |
118 "shortdescription": "A0" | |
119 } | |
120 ] | |
121 Check that debugobshistory on the first diverged revision show the revision | |
122 and the diverent one | |
123 $ hg obslog fdf9bde5129a --patch | |
124 * fdf9bde5129a (2) A1 | |
125 | | |
126 @ 471f378eab4c (1) A0 | |
127 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
128 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
129 --- a/changeset-description | |
130 +++ b/changeset-description | |
131 @@ -1,1 +1,1 @@ | |
132 -A0 | |
133 +A1 | |
134 | |
135 | |
136 | |
137 Check that all option show all of them | |
138 $ hg obslog fdf9bde5129a -a --patch | |
139 * fdf9bde5129a (2) A1 | |
140 | | |
141 @ 471f378eab4c (1) A0 | |
142 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
143 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
144 --- a/changeset-description | |
145 +++ b/changeset-description | |
146 @@ -1,1 +1,1 @@ | |
147 -A0 | |
148 +A1 | |
149 | |
150 | |
151 Check that debugobshistory on the second diverged revision show the revision | |
152 and the diverent one | |
153 $ hg obslog fdf9bde5129a --patch | |
154 * fdf9bde5129a (2) A1 | |
155 | | |
156 @ 471f378eab4c (1) A0 | |
157 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
158 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
159 --- a/changeset-description | |
160 +++ b/changeset-description | |
161 @@ -1,1 +1,1 @@ | |
162 -A0 | |
163 +A1 | |
164 | |
165 | |
166 Check that all option show all of them | |
167 $ hg obslog fdf9bde5129a -a --patch | |
168 * fdf9bde5129a (2) A1 | |
169 | | |
170 @ 471f378eab4c (1) A0 | |
171 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
172 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
173 --- a/changeset-description | |
174 +++ b/changeset-description | |
175 @@ -1,1 +1,1 @@ | |
176 -A0 | |
177 +A1 | |
178 | |
179 | |
180 Check that debugobshistory on the both diverged revision show a coherent | |
181 graph | |
182 $ hg obslog 'fdf9bde5129a+fdf9bde5129a' --patch | |
183 * fdf9bde5129a (2) A1 | |
184 | | |
185 @ 471f378eab4c (1) A0 | |
186 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
187 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
188 --- a/changeset-description | |
189 +++ b/changeset-description | |
190 @@ -1,1 +1,1 @@ | |
191 -A0 | |
192 +A1 | |
193 | |
194 | |
195 $ hg obslog 'fdf9bde5129a+fdf9bde5129a' --no-graph -Tjson | python -m json.tool | |
196 [ | |
197 { | |
198 "markers": [], | |
199 "node": "fdf9bde5129a", | |
200 "rev": 2, | |
201 "shortdescription": "A1" | |
202 }, | |
203 { | |
204 "markers": [ | |
205 { | |
206 "date": [ | |
207 0, | |
208 0 | |
209 ], | |
210 "effect": [ | |
211 "description" | |
212 ], | |
213 "operation": "amend", | |
214 "succnodes": [ | |
215 "fdf9bde5129a" | |
216 ], | |
217 "user": "test", | |
218 "verb": "rewritten" | |
219 } | |
220 ], | |
221 "node": "471f378eab4c", | |
222 "rev": 1, | |
223 "shortdescription": "A0" | |
224 } | |
225 ] | |
226 $ hg update 471f378eab4c | |
227 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
228 $ hg update --hidden 'desc(A0)' | |
229 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |