Mercurial > evolve
comparison tests/test-evolve-obshistory-content-divergent.t @ 3914:96945ea908df stable
branching: merge default into stable
The stable branch of Mercurial core now contains Mercurial 4.7 so evolve branch
policy requires this merge. The @ bookmark is in the right location, so people
doing clone will get to the latest release.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 31 Jul 2018 12:52:06 +0200 |
parents | 11b775fddda8 |
children | f7afd3a158e3 f16274729530 |
comparison
equal
deleted
inserted
replaced
3901:f2b8429db565 | 3914:96945ea908df |
---|---|
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 content-divergence | |
10 =================================== | |
11 | |
12 Test setup | |
13 ---------- | |
14 | |
15 $ hg init $TESTTMP/local-divergence | |
16 $ cd $TESTTMP/local-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 amend -m "A2" | |
46 2 new content-divergent changesets | |
47 $ hg log --hidden -G | |
48 @ changeset: 3:65b757b745b9 | |
49 | tag: tip | |
50 | parent: 0:ea207398892e | |
51 | user: test | |
52 | date: Thu Jan 01 00:00:00 1970 +0000 | |
53 | instability: content-divergent | |
54 | summary: A2 | |
55 | | |
56 | * changeset: 2:fdf9bde5129a | |
57 |/ parent: 0:ea207398892e | |
58 | user: test | |
59 | date: Thu Jan 01 00:00:00 1970 +0000 | |
60 | instability: content-divergent | |
61 | summary: A1 | |
62 | | |
63 | x changeset: 1:471f378eab4c | |
64 |/ user: test | |
65 | date: Thu Jan 01 00:00:00 1970 +0000 | |
66 | obsolete: reworded using amend as 2:fdf9bde5129a | |
67 | obsolete: reworded using amend as 3:65b757b745b9 | |
68 | summary: A0 | |
69 | | |
70 o changeset: 0:ea207398892e | |
71 user: test | |
72 date: Thu Jan 01 00:00:00 1970 +0000 | |
73 summary: ROOT | |
74 | |
75 Actual test | |
76 ----------- | |
77 | |
78 Check that debugobshistory on the divergent revision show both destinations | |
79 $ hg obslog --hidden 471f378eab4c --patch | |
80 x 471f378eab4c (1) A0 | |
81 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
82 diff -r 471f378eab4c -r 65b757b745b9 changeset-description | |
83 --- a/changeset-description | |
84 +++ b/changeset-description | |
85 @@ -1,1 +1,1 @@ | |
86 -A0 | |
87 +A2 | |
88 | |
89 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
90 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
91 --- a/changeset-description | |
92 +++ b/changeset-description | |
93 @@ -1,1 +1,1 @@ | |
94 -A0 | |
95 +A1 | |
96 | |
97 | |
98 | |
99 Check that with all option, every changeset is shown | |
100 $ hg obslog --hidden --all 471f378eab4c --patch | |
101 @ 65b757b745b9 (3) A2 | |
102 | | |
103 | * fdf9bde5129a (2) A1 | |
104 |/ | |
105 x 471f378eab4c (1) A0 | |
106 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
107 diff -r 471f378eab4c -r 65b757b745b9 changeset-description | |
108 --- a/changeset-description | |
109 +++ b/changeset-description | |
110 @@ -1,1 +1,1 @@ | |
111 -A0 | |
112 +A2 | |
113 | |
114 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
115 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
116 --- a/changeset-description | |
117 +++ b/changeset-description | |
118 @@ -1,1 +1,1 @@ | |
119 -A0 | |
120 +A1 | |
121 | |
122 | |
123 $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool | |
124 [ | |
125 { | |
126 "markers": [ | |
127 { | |
128 "date": [ | |
129 *, (glob) | |
130 0 (glob) | |
131 ], | |
132 "effect": [ | |
133 "description" | |
134 ], | |
135 "operation": "amend", | |
136 "succnodes": [ | |
137 "65b757b745b9" | |
138 ], | |
139 "user": "test", | |
140 "verb": "rewritten" | |
141 }, | |
142 { | |
143 "date": [ | |
144 *, (glob) | |
145 0 (glob) | |
146 ], | |
147 "effect": [ | |
148 "description" | |
149 ], | |
150 "operation": "amend", | |
151 "succnodes": [ | |
152 "fdf9bde5129a" | |
153 ], | |
154 "user": "test", | |
155 "verb": "rewritten" | |
156 } | |
157 ], | |
158 "node": "471f378eab4c", | |
159 "rev": 1, | |
160 "shortdescription": "A0" | |
161 } | |
162 ] | |
163 Check that debugobshistory on the first diverged revision show the revision | |
164 and the diverent one | |
165 $ hg obslog fdf9bde5129a --patch | |
166 * fdf9bde5129a (2) A1 | |
167 | | |
168 x 471f378eab4c (1) A0 | |
169 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
170 diff -r 471f378eab4c -r 65b757b745b9 changeset-description | |
171 --- a/changeset-description | |
172 +++ b/changeset-description | |
173 @@ -1,1 +1,1 @@ | |
174 -A0 | |
175 +A2 | |
176 | |
177 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
178 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
179 --- a/changeset-description | |
180 +++ b/changeset-description | |
181 @@ -1,1 +1,1 @@ | |
182 -A0 | |
183 +A1 | |
184 | |
185 | |
186 | |
187 Check that all option show all of them | |
188 $ hg obslog fdf9bde5129a -a --patch | |
189 @ 65b757b745b9 (3) A2 | |
190 | | |
191 | * fdf9bde5129a (2) A1 | |
192 |/ | |
193 x 471f378eab4c (1) A0 | |
194 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
195 diff -r 471f378eab4c -r 65b757b745b9 changeset-description | |
196 --- a/changeset-description | |
197 +++ b/changeset-description | |
198 @@ -1,1 +1,1 @@ | |
199 -A0 | |
200 +A2 | |
201 | |
202 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
203 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
204 --- a/changeset-description | |
205 +++ b/changeset-description | |
206 @@ -1,1 +1,1 @@ | |
207 -A0 | |
208 +A1 | |
209 | |
210 | |
211 Check that debugobshistory on the second diverged revision show the revision | |
212 and the diverent one | |
213 $ hg obslog 65b757b745b9 --patch | |
214 @ 65b757b745b9 (3) A2 | |
215 | | |
216 x 471f378eab4c (1) A0 | |
217 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
218 diff -r 471f378eab4c -r 65b757b745b9 changeset-description | |
219 --- a/changeset-description | |
220 +++ b/changeset-description | |
221 @@ -1,1 +1,1 @@ | |
222 -A0 | |
223 +A2 | |
224 | |
225 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
226 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
227 --- a/changeset-description | |
228 +++ b/changeset-description | |
229 @@ -1,1 +1,1 @@ | |
230 -A0 | |
231 +A1 | |
232 | |
233 | |
234 Check that all option show all of them | |
235 $ hg obslog 65b757b745b9 -a --patch | |
236 @ 65b757b745b9 (3) A2 | |
237 | | |
238 | * fdf9bde5129a (2) A1 | |
239 |/ | |
240 x 471f378eab4c (1) A0 | |
241 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
242 diff -r 471f378eab4c -r 65b757b745b9 changeset-description | |
243 --- a/changeset-description | |
244 +++ b/changeset-description | |
245 @@ -1,1 +1,1 @@ | |
246 -A0 | |
247 +A2 | |
248 | |
249 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
250 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
251 --- a/changeset-description | |
252 +++ b/changeset-description | |
253 @@ -1,1 +1,1 @@ | |
254 -A0 | |
255 +A1 | |
256 | |
257 | |
258 Check that debugobshistory on the both diverged revision show a coherent | |
259 graph | |
260 $ hg obslog '65b757b745b9+fdf9bde5129a' --patch | |
261 @ 65b757b745b9 (3) A2 | |
262 | | |
263 | * fdf9bde5129a (2) A1 | |
264 |/ | |
265 x 471f378eab4c (1) A0 | |
266 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
267 diff -r 471f378eab4c -r 65b757b745b9 changeset-description | |
268 --- a/changeset-description | |
269 +++ b/changeset-description | |
270 @@ -1,1 +1,1 @@ | |
271 -A0 | |
272 +A2 | |
273 | |
274 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) | |
275 diff -r 471f378eab4c -r fdf9bde5129a changeset-description | |
276 --- a/changeset-description | |
277 +++ b/changeset-description | |
278 @@ -1,1 +1,1 @@ | |
279 -A0 | |
280 +A1 | |
281 | |
282 | |
283 $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool | |
284 [ | |
285 { | |
286 "markers": [], | |
287 "node": "65b757b745b9", | |
288 "rev": 3, | |
289 "shortdescription": "A2" | |
290 }, | |
291 { | |
292 "markers": [ | |
293 { | |
294 "date": [ | |
295 *, (glob) | |
296 0 (glob) | |
297 ], | |
298 "effect": [ | |
299 "description" | |
300 ], | |
301 "operation": "amend", | |
302 "succnodes": [ | |
303 "65b757b745b9" | |
304 ], | |
305 "user": "test", | |
306 "verb": "rewritten" | |
307 }, | |
308 { | |
309 "date": [ | |
310 *, (glob) | |
311 0 (glob) | |
312 ], | |
313 "effect": [ | |
314 "description" | |
315 ], | |
316 "operation": "amend", | |
317 "succnodes": [ | |
318 "fdf9bde5129a" | |
319 ], | |
320 "user": "test", | |
321 "verb": "rewritten" | |
322 } | |
323 ], | |
324 "node": "471f378eab4c", | |
325 "rev": 1, | |
326 "shortdescription": "A0" | |
327 }, | |
328 { | |
329 "markers": [], | |
330 "node": "fdf9bde5129a", | |
331 "rev": 2, | |
332 "shortdescription": "A1" | |
333 } | |
334 ] | |
335 $ hg update 471f378eab4c | |
336 abort: hidden revision '471f378eab4c' has diverged! | |
337 (use --hidden to access hidden revisions) | |
338 [255] | |
339 $ hg update --hidden 'desc(A0)' | |
340 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
341 updated to hidden changeset 471f378eab4c | |
342 (hidden revision '471f378eab4c' has diverged) | |
343 working directory parent is obsolete! (471f378eab4c) | |
344 (471f378eab4c has diverged, use 'hg evolve --list --content-divergent' to resolve the issue) |