Mercurial > hg
comparison tests/test-rebase-pull.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 | eb586ed5d8ce |
children | 4441705b7111 |
comparison
equal
deleted
inserted
replaced
35384:b9bdee046cc2 | 35385:469b06b4c3ca |
---|---|
2 > [extensions] | 2 > [extensions] |
3 > rebase= | 3 > rebase= |
4 > histedit= | 4 > histedit= |
5 > | 5 > |
6 > [alias] | 6 > [alias] |
7 > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | 7 > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" |
8 > EOF | 8 > EOF |
9 | 9 |
10 | 10 |
11 $ hg init a | 11 $ hg init a |
12 $ cd a | 12 $ cd a |
57 new changesets 77ae9631bcca | 57 new changesets 77ae9631bcca |
58 rebasing 2:ff8d69a621f9 "L1" | 58 rebasing 2:ff8d69a621f9 "L1" |
59 saved backup bundle to $TESTTMP/b/.hg/strip-backup/ff8d69a621f9-160fa373-rebase.hg (glob) | 59 saved backup bundle to $TESTTMP/b/.hg/strip-backup/ff8d69a621f9-160fa373-rebase.hg (glob) |
60 | 60 |
61 $ hg tglog | 61 $ hg tglog |
62 @ 3: 'L1' | 62 @ 3: d80cc2da061e 'L1' |
63 | | 63 | |
64 o 2: 'R1' | 64 o 2: 77ae9631bcca 'R1' |
65 | | 65 | |
66 o 1: 'C2' | 66 o 1: 783333faa078 'C2' |
67 | | 67 | |
68 o 0: 'C1' | 68 o 0: 05d58a0c15dd 'C1' |
69 | 69 |
70 Re-run: | 70 Re-run: |
71 | 71 |
72 $ hg pull --rebase | 72 $ hg pull --rebase |
73 pulling from $TESTTMP/a (glob) | 73 pulling from $TESTTMP/a (glob) |
101 | 101 |
102 $ cd .. | 102 $ cd .. |
103 $ hg clone --noupdate c d | 103 $ hg clone --noupdate c d |
104 $ cd d | 104 $ cd d |
105 $ hg tglog | 105 $ hg tglog |
106 o 1: 'C2' | 106 o 1: 783333faa078 'C2' |
107 | | 107 | |
108 o 0: 'C1' | 108 o 0: 05d58a0c15dd 'C1' |
109 | 109 |
110 $ hg update --quiet 0 | 110 $ hg update --quiet 0 |
111 $ echo M1 > M1 | 111 $ echo M1 > M1 |
112 $ hg commit --quiet -Am M1 | 112 $ hg commit --quiet -Am M1 |
113 $ hg update --quiet 1 | 113 $ hg update --quiet 1 |
148 nothing to rebase - updating instead | 148 nothing to rebase - updating instead |
149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
150 updating bookmark norebase | 150 updating bookmark norebase |
151 | 151 |
152 $ hg tglog -l 1 | 152 $ hg tglog -l 1 |
153 @ 2: 'R1' | 153 @ 2: 77ae9631bcca 'R1' |
154 | | 154 | |
155 ~ | 155 ~ |
156 | 156 |
157 pull --rebase --update should ignore --update: | 157 pull --rebase --update should ignore --update: |
158 | 158 |
169 pulling from $TESTTMP/a (glob) | 169 pulling from $TESTTMP/a (glob) |
170 searching for changes | 170 searching for changes |
171 no changes found | 171 no changes found |
172 | 172 |
173 $ hg tglog -l 1 | 173 $ hg tglog -l 1 |
174 o 2: 'R1' | 174 o 2: 77ae9631bcca 'R1' |
175 | | 175 | |
176 ~ | 176 ~ |
177 | 177 |
178 $ cd .. | 178 $ cd .. |
179 | 179 |
180 pull --rebase works when a specific revision is pulled (issue3619) | 180 pull --rebase works when a specific revision is pulled (issue3619) |
181 | 181 |
182 $ cd a | 182 $ cd a |
183 $ hg tglog | 183 $ hg tglog |
184 @ 2: 'R1' | 184 @ 2: 77ae9631bcca 'R1' |
185 | | 185 | |
186 o 1: 'C2' | 186 o 1: 783333faa078 'C2' |
187 | | 187 | |
188 o 0: 'C1' | 188 o 0: 05d58a0c15dd 'C1' |
189 | 189 |
190 $ echo R2 > R2 | 190 $ echo R2 > R2 |
191 $ hg ci -Am R2 | 191 $ hg ci -Am R2 |
192 adding R2 | 192 adding R2 |
193 $ echo R3 > R3 | 193 $ echo R3 > R3 |
194 $ hg ci -Am R3 | 194 $ hg ci -Am R3 |
195 adding R3 | 195 adding R3 |
196 $ cd ../c | 196 $ cd ../c |
197 $ hg tglog | 197 $ hg tglog |
198 o 2: 'R1' | 198 o 2: 77ae9631bcca 'R1' |
199 | | 199 | |
200 @ 1: 'C2' | 200 @ 1: 783333faa078 'C2' |
201 | | 201 | |
202 o 0: 'C1' | 202 o 0: 05d58a0c15dd 'C1' |
203 | 203 |
204 $ echo L1 > L1 | 204 $ echo L1 > L1 |
205 $ hg ci -Am L1 | 205 $ hg ci -Am L1 |
206 adding L1 | 206 adding L1 |
207 created new head | 207 created new head |
214 added 2 changesets with 2 changes to 2 files | 214 added 2 changesets with 2 changes to 2 files |
215 new changesets 31cd3a05214e:770a61882ace | 215 new changesets 31cd3a05214e:770a61882ace |
216 rebasing 3:ff8d69a621f9 "L1" | 216 rebasing 3:ff8d69a621f9 "L1" |
217 saved backup bundle to $TESTTMP/c/.hg/strip-backup/ff8d69a621f9-160fa373-rebase.hg (glob) | 217 saved backup bundle to $TESTTMP/c/.hg/strip-backup/ff8d69a621f9-160fa373-rebase.hg (glob) |
218 $ hg tglog | 218 $ hg tglog |
219 @ 5: 'L1' | 219 @ 5: 518d153c0ba3 'L1' |
220 | | 220 | |
221 o 4: 'R3' | 221 o 4: 770a61882ace 'R3' |
222 | | 222 | |
223 o 3: 'R2' | 223 o 3: 31cd3a05214e 'R2' |
224 | | 224 | |
225 o 2: 'R1' | 225 o 2: 77ae9631bcca 'R1' |
226 | | 226 | |
227 o 1: 'C2' | 227 o 1: 783333faa078 'C2' |
228 | | 228 | |
229 o 0: 'C1' | 229 o 0: 05d58a0c15dd 'C1' |
230 | 230 |
231 pull --rebase works with bundle2 turned on | 231 pull --rebase works with bundle2 turned on |
232 | 232 |
233 $ cd ../a | 233 $ cd ../a |
234 $ echo R4 > R4 | 234 $ echo R4 > R4 |
235 $ hg ci -Am R4 | 235 $ hg ci -Am R4 |
236 adding R4 | 236 adding R4 |
237 $ hg tglog | 237 $ hg tglog |
238 @ 5: 'R4' | 238 @ 5: 00e3b7781125 'R4' |
239 | | 239 | |
240 o 4: 'R3' | 240 o 4: 770a61882ace 'R3' |
241 | | 241 | |
242 o 3: 'R2' | 242 o 3: 31cd3a05214e 'R2' |
243 | | 243 | |
244 o 2: 'R1' | 244 o 2: 77ae9631bcca 'R1' |
245 | | 245 | |
246 o 1: 'C2' | 246 o 1: 783333faa078 'C2' |
247 | | 247 | |
248 o 0: 'C1' | 248 o 0: 05d58a0c15dd 'C1' |
249 | 249 |
250 $ cd ../c | 250 $ cd ../c |
251 $ hg pull --rebase | 251 $ hg pull --rebase |
252 pulling from $TESTTMP/a (glob) | 252 pulling from $TESTTMP/a (glob) |
253 searching for changes | 253 searching for changes |
257 added 1 changesets with 1 changes to 1 files (+1 heads) | 257 added 1 changesets with 1 changes to 1 files (+1 heads) |
258 new changesets 00e3b7781125 | 258 new changesets 00e3b7781125 |
259 rebasing 5:518d153c0ba3 "L1" | 259 rebasing 5:518d153c0ba3 "L1" |
260 saved backup bundle to $TESTTMP/c/.hg/strip-backup/518d153c0ba3-73407f14-rebase.hg (glob) | 260 saved backup bundle to $TESTTMP/c/.hg/strip-backup/518d153c0ba3-73407f14-rebase.hg (glob) |
261 $ hg tglog | 261 $ hg tglog |
262 @ 6: 'L1' | 262 @ 6: 0d0727eb7ce0 'L1' |
263 | | 263 | |
264 o 5: 'R4' | 264 o 5: 00e3b7781125 'R4' |
265 | | 265 | |
266 o 4: 'R3' | 266 o 4: 770a61882ace 'R3' |
267 | | 267 | |
268 o 3: 'R2' | 268 o 3: 31cd3a05214e 'R2' |
269 | | 269 | |
270 o 2: 'R1' | 270 o 2: 77ae9631bcca 'R1' |
271 | | 271 | |
272 o 1: 'C2' | 272 o 1: 783333faa078 'C2' |
273 | | 273 | |
274 o 0: 'C1' | 274 o 0: 05d58a0c15dd 'C1' |
275 | 275 |
276 | 276 |
277 pull --rebase only update if there is nothing to rebase | 277 pull --rebase only update if there is nothing to rebase |
278 | 278 |
279 $ cd ../a | 279 $ cd ../a |
280 $ echo R5 > R5 | 280 $ echo R5 > R5 |
281 $ hg ci -Am R5 | 281 $ hg ci -Am R5 |
282 adding R5 | 282 adding R5 |
283 $ hg tglog | 283 $ hg tglog |
284 @ 6: 'R5' | 284 @ 6: 88dd24261747 'R5' |
285 | | 285 | |
286 o 5: 'R4' | 286 o 5: 00e3b7781125 'R4' |
287 | | 287 | |
288 o 4: 'R3' | 288 o 4: 770a61882ace 'R3' |
289 | | 289 | |
290 o 3: 'R2' | 290 o 3: 31cd3a05214e 'R2' |
291 | | 291 | |
292 o 2: 'R1' | 292 o 2: 77ae9631bcca 'R1' |
293 | | 293 | |
294 o 1: 'C2' | 294 o 1: 783333faa078 'C2' |
295 | | 295 | |
296 o 0: 'C1' | 296 o 0: 05d58a0c15dd 'C1' |
297 | 297 |
298 $ cd ../c | 298 $ cd ../c |
299 $ echo L2 > L2 | 299 $ echo L2 > L2 |
300 $ hg ci -Am L2 | 300 $ hg ci -Am L2 |
301 adding L2 | 301 adding L2 |
311 new changesets 88dd24261747 | 311 new changesets 88dd24261747 |
312 rebasing 6:0d0727eb7ce0 "L1" | 312 rebasing 6:0d0727eb7ce0 "L1" |
313 rebasing 7:c1f58876e3bf "L2" | 313 rebasing 7:c1f58876e3bf "L2" |
314 saved backup bundle to $TESTTMP/c/.hg/strip-backup/0d0727eb7ce0-ef61ccb2-rebase.hg (glob) | 314 saved backup bundle to $TESTTMP/c/.hg/strip-backup/0d0727eb7ce0-ef61ccb2-rebase.hg (glob) |
315 $ hg tglog | 315 $ hg tglog |
316 o 8: 'L2' | 316 o 8: 6dc0ea5dcf55 'L2' |
317 | | 317 | |
318 @ 7: 'L1' | 318 @ 7: 864e0a2d2614 'L1' |
319 | | 319 | |
320 o 6: 'R5' | 320 o 6: 88dd24261747 'R5' |
321 | | 321 | |
322 o 5: 'R4' | 322 o 5: 00e3b7781125 'R4' |
323 | | 323 | |
324 o 4: 'R3' | 324 o 4: 770a61882ace 'R3' |
325 | | 325 | |
326 o 3: 'R2' | 326 o 3: 31cd3a05214e 'R2' |
327 | | 327 | |
328 o 2: 'R1' | 328 o 2: 77ae9631bcca 'R1' |
329 | | 329 | |
330 o 1: 'C2' | 330 o 1: 783333faa078 'C2' |
331 | | 331 | |
332 o 0: 'C1' | 332 o 0: 05d58a0c15dd 'C1' |
333 | 333 |
334 | 334 |
335 pull --rebase update (no rebase) use proper update: | 335 pull --rebase update (no rebase) use proper update: |
336 | 336 |
337 - warn about other head. | 337 - warn about other head. |
354 nothing to rebase - updating instead | 354 nothing to rebase - updating instead |
355 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 355 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
356 updated to "65bc164c1d9b: R6" | 356 updated to "65bc164c1d9b: R6" |
357 1 other heads for branch "default" | 357 1 other heads for branch "default" |
358 $ hg tglog | 358 $ hg tglog |
359 @ 9: 'R6' | 359 @ 9: 65bc164c1d9b 'R6' |
360 | | 360 | |
361 | o 8: 'L2' | 361 | o 8: 6dc0ea5dcf55 'L2' |
362 | | | 362 | | |
363 | o 7: 'L1' | 363 | o 7: 864e0a2d2614 'L1' |
364 |/ | 364 |/ |
365 o 6: 'R5' | 365 o 6: 88dd24261747 'R5' |
366 | | 366 | |
367 o 5: 'R4' | 367 o 5: 00e3b7781125 'R4' |
368 | | 368 | |
369 o 4: 'R3' | 369 o 4: 770a61882ace 'R3' |
370 | | 370 | |
371 o 3: 'R2' | 371 o 3: 31cd3a05214e 'R2' |
372 | | 372 | |
373 o 2: 'R1' | 373 o 2: 77ae9631bcca 'R1' |
374 | | 374 | |
375 o 1: 'C2' | 375 o 1: 783333faa078 'C2' |
376 | | 376 | |
377 o 0: 'C1' | 377 o 0: 05d58a0c15dd 'C1' |
378 | 378 |
379 | 379 |
380 Multiple pre-existing heads on the branch | 380 Multiple pre-existing heads on the branch |
381 ----------------------------------------- | 381 ----------------------------------------- |
382 | 382 |
430 new changesets f7d3e42052f9 | 430 new changesets f7d3e42052f9 |
431 rebasing 7:864e0a2d2614 "L1" | 431 rebasing 7:864e0a2d2614 "L1" |
432 rebasing 8:6dc0ea5dcf55 "L2" | 432 rebasing 8:6dc0ea5dcf55 "L2" |
433 saved backup bundle to $TESTTMP/c/.hg/strip-backup/864e0a2d2614-2f72c89c-rebase.hg (glob) | 433 saved backup bundle to $TESTTMP/c/.hg/strip-backup/864e0a2d2614-2f72c89c-rebase.hg (glob) |
434 $ hg tglog | 434 $ hg tglog |
435 @ 12: 'L2' | 435 @ 12: 3603a865eea0 'L2' |
436 | | 436 | |
437 o 11: 'L1' | 437 o 11: bcc8a9cd04bf 'L1' |
438 | | 438 | |
439 o 10: 'R7' | 439 o 10: f7d3e42052f9 'R7' |
440 | | 440 | |
441 | o 9: 'M1' | 441 | o 9: 41fab4eef82f 'M1' |
442 |/ | 442 |/ |
443 | o 8: 'B1' unrelatedbranch | 443 | o 8: 39c381359968 'B1' unrelatedbranch |
444 |/ | 444 |/ |
445 o 7: 'R6' | 445 o 7: 65bc164c1d9b 'R6' |
446 | | 446 | |
447 o 6: 'R5' | 447 o 6: 88dd24261747 'R5' |
448 | | 448 | |
449 o 5: 'R4' | 449 o 5: 00e3b7781125 'R4' |
450 | | 450 | |
451 o 4: 'R3' | 451 o 4: 770a61882ace 'R3' |
452 | | 452 | |
453 o 3: 'R2' | 453 o 3: 31cd3a05214e 'R2' |
454 | | 454 | |
455 o 2: 'R1' | 455 o 2: 77ae9631bcca 'R1' |
456 | | 456 | |
457 o 1: 'C2' | 457 o 1: 783333faa078 'C2' |
458 | | 458 | |
459 o 0: 'C1' | 459 o 0: 05d58a0c15dd 'C1' |
460 | 460 |