Mercurial > hg
comparison tests/test-rebase-base-flag.t @ 35385:469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Commit hashes are a useful way to ensure the content of commits made in the
tests are not changing, even if we don't query every aspect of every commit.
(And some properties, like extras, are rarely printed at all.)
Many of the rebase log -G calls didn't show hashes; by adding hashes to places
that weren't showing them we can help protect those tests from unwanted
changes.
Differential Revision: https://phab.mercurial-scm.org/D1650
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Sun, 10 Dec 2017 21:57:37 -0800 |
parents | 8cef8f7d51d0 |
children | 5abc47d4ca6b |
comparison
equal
deleted
inserted
replaced
35384:b9bdee046cc2 | 35385:469b06b4c3ca |
---|---|
8 > | 8 > |
9 > [phases] | 9 > [phases] |
10 > publish=False | 10 > publish=False |
11 > | 11 > |
12 > [alias] | 12 > [alias] |
13 > tglog = log -G --template "{rev}: {desc}" | 13 > tglog = log -G --template "{rev}: {node|short} {desc}" |
14 > EOF | 14 > EOF |
15 | 15 |
16 $ rebasewithdag() { | 16 $ rebasewithdag() { |
17 > N=`$PYTHON -c "print($N+1)"` | 17 > N=`$PYTHON -c "print($N+1)"` |
18 > hg init repo$N && cd repo$N | 18 > hg init repo$N && cd repo$N |
37 > R | 37 > R |
38 > EOS | 38 > EOS |
39 rebasing 3:d6003a550c2c "C" (C) | 39 rebasing 3:d6003a550c2c "C" (C) |
40 rebasing 5:4526cf523425 "D" (D) | 40 rebasing 5:4526cf523425 "D" (D) |
41 rebasing 6:b296604d9846 "E" (E tip) | 41 rebasing 6:b296604d9846 "E" (E tip) |
42 o 6: E | 42 o 6: 4870f5e7df37 E |
43 | | 43 | |
44 | o 5: D | 44 | o 5: dc999528138a D |
45 |/ | 45 |/ |
46 o 4: C | 46 o 4: 6b3e11729672 C |
47 | | 47 | |
48 o 3: Z | 48 o 3: 57e70bad1ea3 Z |
49 | | 49 | |
50 | o 2: B | 50 | o 2: c1e6b162678d B |
51 |/ | 51 |/ |
52 o 1: A | 52 o 1: 21a6c4502885 A |
53 | | 53 | |
54 o 0: R | 54 o 0: b41ce7760717 R |
55 | 55 |
56 Multiple branching points caused by selecting a single merge changeset: | 56 Multiple branching points caused by selecting a single merge changeset: |
57 | 57 |
58 $ rebasewithdag -b E -d Z <<'EOS' | 58 $ rebasewithdag -b E -d Z <<'EOS' |
59 > E | 59 > E |
67 > R | 67 > R |
68 > EOS | 68 > EOS |
69 rebasing 2:c1e6b162678d "B" (B) | 69 rebasing 2:c1e6b162678d "B" (B) |
70 rebasing 3:d6003a550c2c "C" (C) | 70 rebasing 3:d6003a550c2c "C" (C) |
71 rebasing 6:54c8f00cb91c "E" (E tip) | 71 rebasing 6:54c8f00cb91c "E" (E tip) |
72 o 6: E | 72 o 6: 00598421b616 E |
73 |\ | 73 |\ |
74 | o 5: C | 74 | o 5: 6b3e11729672 C |
75 | | | 75 | | |
76 o | 4: B | 76 o | 4: 85260910e847 B |
77 |/ | 77 |/ |
78 o 3: Z | 78 o 3: 57e70bad1ea3 Z |
79 | | 79 | |
80 | o 2: D | 80 | o 2: 8924700906fe D |
81 |/ | 81 |/ |
82 o 1: A | 82 o 1: 21a6c4502885 A |
83 | | 83 | |
84 o 0: R | 84 o 0: b41ce7760717 R |
85 | 85 |
86 Rebase should not extend the "--base" revset using "descendants": | 86 Rebase should not extend the "--base" revset using "descendants": |
87 | 87 |
88 $ rebasewithdag -b B -d Z <<'EOS' | 88 $ rebasewithdag -b B -d Z <<'EOS' |
89 > E | 89 > E |
94 > | | 94 > | |
95 > R | 95 > R |
96 > EOS | 96 > EOS |
97 rebasing 2:c1e6b162678d "B" (B) | 97 rebasing 2:c1e6b162678d "B" (B) |
98 rebasing 5:54c8f00cb91c "E" (E tip) | 98 rebasing 5:54c8f00cb91c "E" (E tip) |
99 o 5: E | 99 o 5: e583bf3ff54c E |
100 |\ | 100 |\ |
101 | o 4: B | 101 | o 4: 85260910e847 B |
102 | | | 102 | | |
103 | o 3: Z | 103 | o 3: 57e70bad1ea3 Z |
104 | | | 104 | | |
105 o | 2: C | 105 o | 2: d6003a550c2c C |
106 |/ | 106 |/ |
107 o 1: A | 107 o 1: 21a6c4502885 A |
108 | | 108 | |
109 o 0: R | 109 o 0: b41ce7760717 R |
110 | 110 |
111 Rebase should not simplify the "--base" revset using "roots": | 111 Rebase should not simplify the "--base" revset using "roots": |
112 | 112 |
113 $ rebasewithdag -b B+E -d Z <<'EOS' | 113 $ rebasewithdag -b B+E -d Z <<'EOS' |
114 > E | 114 > E |
120 > R | 120 > R |
121 > EOS | 121 > EOS |
122 rebasing 2:c1e6b162678d "B" (B) | 122 rebasing 2:c1e6b162678d "B" (B) |
123 rebasing 3:d6003a550c2c "C" (C) | 123 rebasing 3:d6003a550c2c "C" (C) |
124 rebasing 5:54c8f00cb91c "E" (E tip) | 124 rebasing 5:54c8f00cb91c "E" (E tip) |
125 o 5: E | 125 o 5: 00598421b616 E |
126 |\ | 126 |\ |
127 | o 4: C | 127 | o 4: 6b3e11729672 C |
128 | | | 128 | | |
129 o | 3: B | 129 o | 3: 85260910e847 B |
130 |/ | 130 |/ |
131 o 2: Z | 131 o 2: 57e70bad1ea3 Z |
132 | | 132 | |
133 o 1: A | 133 o 1: 21a6c4502885 A |
134 | | 134 | |
135 o 0: R | 135 o 0: b41ce7760717 R |
136 | 136 |
137 The destination is one of the two branching points of a merge: | 137 The destination is one of the two branching points of a merge: |
138 | 138 |
139 $ rebasewithdag -b F -d Z <<'EOS' | 139 $ rebasewithdag -b F -d Z <<'EOS' |
140 > F | 140 > F |
171 rebasing 5:06ce7b1cc8c2 "B2" (B2) | 171 rebasing 5:06ce7b1cc8c2 "B2" (B2) |
172 rebasing 6:0ac98cce32d3 "C1" (C1) | 172 rebasing 6:0ac98cce32d3 "C1" (C1) |
173 rebasing 8:781512f5e33d "C2" (C2) | 173 rebasing 8:781512f5e33d "C2" (C2) |
174 rebasing 9:428d8c18f641 "E1" (E1) | 174 rebasing 9:428d8c18f641 "E1" (E1) |
175 rebasing 11:e1bf82f6b6df "E2" (E2) | 175 rebasing 11:e1bf82f6b6df "E2" (E2) |
176 o 12: E2 | 176 o 12: e4a37b6fdbd2 E2 |
177 | | 177 | |
178 o 11: E1 | 178 o 11: 9675bea983df E1 |
179 | | 179 | |
180 | o 10: C2 | 180 | o 10: 4faf5d4c80dc C2 |
181 | | | 181 | | |
182 | o 9: C1 | 182 | o 9: d4799b1ad57d C1 |
183 |/ | 183 |/ |
184 | o 8: B2 | 184 | o 8: 772732dc64d6 B2 |
185 | | | 185 | | |
186 | o 7: B1 | 186 | o 7: ad3ac528a49f B1 |
187 |/ | 187 |/ |
188 o 6: Z | 188 o 6: 2cbdfca6b9d5 Z |
189 | | 189 | |
190 o 5: F | 190 o 5: fcdb3293ec13 F |
191 | | 191 | |
192 o 4: E | 192 o 4: a4652bb8ac54 E |
193 | | 193 | |
194 o 3: C | 194 o 3: bd5548558fcf C |
195 | | 195 | |
196 o 2: B | 196 o 2: c1e6b162678d B |
197 | | 197 | |
198 o 1: A | 198 o 1: 21a6c4502885 A |
199 | | 199 | |
200 o 0: R | 200 o 0: b41ce7760717 R |
201 | 201 |
202 Multiple branching points with multiple merges: | 202 Multiple branching points with multiple merges: |
203 | 203 |
204 $ rebasewithdag -b G+P -d Z <<'EOS' | 204 $ rebasewithdag -b G+P -d Z <<'EOS' |
205 > G H P | 205 > G H P |
221 rebasing 5:83780307a7e8 "K" (K) | 221 rebasing 5:83780307a7e8 "K" (K) |
222 rebasing 6:e131637a1cb6 "L" (L) | 222 rebasing 6:e131637a1cb6 "L" (L) |
223 rebasing 11:d1f6d0c3c7e4 "M" (M) | 223 rebasing 11:d1f6d0c3c7e4 "M" (M) |
224 rebasing 12:7aaec6f81888 "N" (N) | 224 rebasing 12:7aaec6f81888 "N" (N) |
225 rebasing 15:325bc8f1760d "P" (P tip) | 225 rebasing 15:325bc8f1760d "P" (P tip) |
226 o 15: P | 226 o 15: 6ef6a0ea3b18 P |
227 |\ | 227 |\ |
228 | o 14: N | 228 | o 14: 20ba3610a7e5 N |
229 | |\ | 229 | |\ |
230 o \ \ 13: M | 230 o \ \ 13: cd4f6c06d2ab M |
231 |\ \ \ | 231 |\ \ \ |
232 | | | o 12: L | 232 | | | o 12: bca872041455 L |
233 | | | | | 233 | | | | |
234 | | o | 11: K | 234 | | o | 11: 7bbb6c8a6ad7 K |
235 | | |/ | 235 | | |/ |
236 | o / 10: J | 236 | o / 10: de0cbffe893e J |
237 | |/ | 237 | |/ |
238 o / 9: I | 238 o / 9: 0e710f176a88 I |
239 |/ | 239 |/ |
240 | o 8: H | 240 | o 8: 52507bab39ca H |
241 | |\ | 241 | |\ |
242 | | | o 7: G | 242 | | | o 7: bb5fe4652f0d G |
243 | | |/| | 243 | | |/| |
244 | | | o 6: F | 244 | | | o 6: f4ad4b31daf4 F |
245 | | | | | 245 | | | | |
246 | | o | 5: E | 246 | | o | 5: b168f85f2e78 E |
247 | | |/ | 247 | | |/ |
248 | o | 4: D | 248 | o | 4: 8d09fcdb5594 D |
249 | |\| | 249 | |\| |
250 +---o 3: C | 250 +---o 3: ab70b4c5a9c9 C |
251 | | | 251 | | |
252 o | 2: Z | 252 o | 2: 262e37e34f63 Z |
253 | | | 253 | | |
254 | o 1: B | 254 | o 1: 112478962961 B |
255 |/ | 255 |/ |
256 o 0: A | 256 o 0: 426bada5c675 A |
257 | 257 |
258 Slightly more complex merge case (mentioned in https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-November/091074.html): | 258 Slightly more complex merge case (mentioned in https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-November/091074.html): |
259 | 259 |
260 $ rebasewithdag -b A3+B3 -d Z <<'EOF' | 260 $ rebasewithdag -b A3+B3 -d Z <<'EOF' |
261 > Z C1 A3 B3 | 261 > Z C1 A3 B3 |
273 rebasing 7:73508237b032 "C1" (C1) | 273 rebasing 7:73508237b032 "C1" (C1) |
274 rebasing 9:fdb955e2faed "A2" (A2) | 274 rebasing 9:fdb955e2faed "A2" (A2) |
275 rebasing 11:4e449bd1a643 "A3" (A3) | 275 rebasing 11:4e449bd1a643 "A3" (A3) |
276 rebasing 10:0a33b0519128 "B1" (B1) | 276 rebasing 10:0a33b0519128 "B1" (B1) |
277 rebasing 12:209327807c3a "B3" (B3 tip) | 277 rebasing 12:209327807c3a "B3" (B3 tip) |
278 o 12: B3 | 278 o 12: ceb984566332 B3 |
279 |\ | 279 |\ |
280 | o 11: B1 | 280 | o 11: 19d93caac497 B1 |
281 | | | 281 | | |
282 | | o 10: A3 | 282 | | o 10: 058e73d3916b A3 |
283 | | |\ | 283 | | |\ |
284 | +---o 9: A2 | 284 | +---o 9: 0ba13ad72234 A2 |
285 | | | | 285 | | | |
286 | o | 8: C1 | 286 | o | 8: c122c2af10c6 C1 |
287 | | | | 287 | | | |
288 o | | 7: B2 | 288 o | | 7: 74275896650e B2 |
289 | | | | 289 | | | |
290 | o | 6: C0 | 290 | o | 6: 455ba9bd3ea2 C0 |
291 |/ / | 291 |/ / |
292 o | 5: Z | 292 o | 5: b3d7d2fda53b Z |
293 | | | 293 | | |
294 o | 4: M3 | 294 o | 4: 182ab6383dd7 M3 |
295 | | | 295 | | |
296 o | 3: M2 | 296 o | 3: 6c3f73563d5f M2 |
297 | | | 297 | | |
298 | o 2: A1 | 298 | o 2: 88c860fffcc2 A1 |
299 |/ | 299 |/ |
300 o 1: M1 | 300 o 1: bc852baa85dd M1 |
301 | | 301 | |
302 o 0: M0 | 302 o 0: dbdfc5c9bcd5 M0 |
303 | 303 |
304 Disconnected graph: | 304 Disconnected graph: |
305 | 305 |
306 $ rebasewithdag -b B -d Z <<'EOS' | 306 $ rebasewithdag -b B -d Z <<'EOS' |
307 > B | 307 > B |
318 > \|\| | 318 > \|\| |
319 > C A | 319 > C A |
320 > EOF | 320 > EOF |
321 rebasing 2:112478962961 "B" (B) | 321 rebasing 2:112478962961 "B" (B) |
322 rebasing 3:b70f76719894 "D" (D) | 322 rebasing 3:b70f76719894 "D" (D) |
323 o 4: D | 323 o 4: 511efad7bf13 D |
324 | | 324 | |
325 | o 3: B | 325 | o 3: 25c4e279af62 B |
326 |/ | 326 |/ |
327 o 2: Z | 327 o 2: 3a49f54d7bb1 Z |
328 |\ | 328 |\ |
329 | o 1: C | 329 | o 1: 96cc3511f894 C |
330 | | 330 | |
331 o 0: A | 331 o 0: 426bada5c675 A |
332 | 332 |
333 Multiple roots. One root is not an ancestor of dest: | 333 Multiple roots. One root is not an ancestor of dest: |
334 | 334 |
335 $ rebasewithdag -b B+D -d Z <<'EOF' | 335 $ rebasewithdag -b B+D -d Z <<'EOF' |
336 > Z B D | 336 > Z B D |
349 > \|\| | 349 > \|\| |
350 > A C | 350 > A C |
351 > EOF | 351 > EOF |
352 rebasing 2:f675d5a1c6a4 "B" (B) | 352 rebasing 2:f675d5a1c6a4 "B" (B) |
353 rebasing 5:f68696fe6af8 "E" (E tip) | 353 rebasing 5:f68696fe6af8 "E" (E tip) |
354 o 5: E | 354 o 5: f6e6f5081554 E |
355 |\ | 355 |\ |
356 | o 4: B | 356 | o 4: 30cabcba27be B |
357 | |\ | 357 | |\ |
358 | | o 3: Z | 358 | | o 3: 262e37e34f63 Z |
359 | | | | 359 | | | |
360 o | | 2: D | 360 o | | 2: b70f76719894 D |
361 |/ / | 361 |/ / |
362 o / 1: C | 362 o / 1: 96cc3511f894 C |
363 / | 363 / |
364 o 0: A | 364 o 0: 426bada5c675 A |
365 | 365 |
366 Multiple roots. Two children share two parents while dest has only one parent: | 366 Multiple roots. Two children share two parents while dest has only one parent: |
367 | 367 |
368 $ rebasewithdag -b B+D -d Z <<'EOF' | 368 $ rebasewithdag -b B+D -d Z <<'EOF' |
369 > Z B D | 369 > Z B D |
370 > \|\|\ | 370 > \|\|\ |
371 > A C A | 371 > A C A |
372 > EOF | 372 > EOF |
373 rebasing 2:f675d5a1c6a4 "B" (B) | 373 rebasing 2:f675d5a1c6a4 "B" (B) |
374 rebasing 3:c2a779e13b56 "D" (D) | 374 rebasing 3:c2a779e13b56 "D" (D) |
375 o 4: D | 375 o 4: 5eecd056b5f8 D |
376 |\ | 376 |\ |
377 +---o 3: B | 377 +---o 3: 30cabcba27be B |
378 | |/ | 378 | |/ |
379 | o 2: Z | 379 | o 2: 262e37e34f63 Z |
380 | | | 380 | | |
381 o | 1: C | 381 o | 1: 96cc3511f894 C |
382 / | 382 / |
383 o 0: A | 383 o 0: 426bada5c675 A |
384 | 384 |