comparison tests/test-rebase-conflicts.t @ 33332:3b7cb3d17137

rebase: use scmutil.cleanupnodes (issue5606) (BC) This patch migrates rebase to use scmutil.cleanupnodes API. It simplifies the code and makes rebase code reusable inside a transaction. This is a BC because the backup file is no longer strip-backup/*-backup.hg, but strip-backup/*-rebase.hg. The latter looks more reasonable since the directory name is "strip-backup" so there is no need to repeat "backup". I think the backup file name change is probably fine as a BC, since we have changed it before (aa4a1672583e) and didn't get complains. The end result of this series will be a much more consistent and unified backup names: command | old backup file suffix | new backup file suffix ------------------------------------------------------------------- amend | amend-backup.hg | amend.hg histedit | backup.hg (could be 2 files) | histedit.hg (single file) rebase | backup.hg | rebase.hg strip | backup.hg | backup.hg (note: backup files are under .hg/strip-backup) It also fixes issue5606 as a side effect because the new "delayedstrip" code path will carefully examine nodes (safestriproots) to make sure orphaned changesets won't get stripped by accident. Some warning messages are changed to the new "warning: orphaned descendants detected, not stripping HASHES", which provides more information about exactly what changesets are left behind. Another minor behavior change is when there is an obsoleted changeset with a successor in the destination branch, bookmarks pointing to that obsoleted changeset will not be moved. I have commented in test-rebase-obsolete.t explaining why that is more desirable.
author Jun Wu <quark@fb.com>
date Fri, 07 Jul 2017 18:51:46 -0700
parents 40ee74bfa111
children 96f43981c1c4
comparison
equal deleted inserted replaced
33331:4bae3c117b57 33332:3b7cb3d17137
85 continue: hg rebase --continue 85 continue: hg rebase --continue
86 $ hg rebase --continue 86 $ hg rebase --continue
87 already rebased 3:3163e20567cc "L1" as 3e046f2ecedb 87 already rebased 3:3163e20567cc "L1" as 3e046f2ecedb
88 rebasing 4:46f0b057b5c0 "L2" 88 rebasing 4:46f0b057b5c0 "L2"
89 rebasing 5:8029388f38dc "L3" (mybook) 89 rebasing 5:8029388f38dc "L3" (mybook)
90 saved backup bundle to $TESTTMP/a/.hg/strip-backup/3163e20567cc-5ca4656e-backup.hg (glob) 90 saved backup bundle to $TESTTMP/a/.hg/strip-backup/3163e20567cc-5ca4656e-rebase.hg (glob)
91 91
92 $ hg tglog 92 $ hg tglog
93 @ 5:secret 'L3' mybook 93 @ 5:secret 'L3' mybook
94 | 94 |
95 o 4:secret 'L2' 95 o 4:secret 'L2'
285 e31216eec445e44352c5f01588856059466a24c9 285 e31216eec445e44352c5f01588856059466a24c9
286 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 286 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2
287 bundle2-output-bundle: "HG20", (1 params) 2 parts total 287 bundle2-output-bundle: "HG20", (1 params) 2 parts total
288 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload 288 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
289 bundle2-output-part: "phase-heads" 24 bytes payload 289 bundle2-output-part: "phase-heads" 24 bytes payload
290 saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) 290 saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-rebase.hg (glob)
291 3 changesets found 291 3 changesets found
292 list of changesets: 292 list of changesets:
293 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c 293 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c
294 19c888675e133ab5dff84516926a65672eaf04d9 294 19c888675e133ab5dff84516926a65672eaf04d9
295 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf 295 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf
398 continue: hg rebase --continue 398 continue: hg rebase --continue
399 $ hg rebase --continue --config experimental.evolution=none 399 $ hg rebase --continue --config experimental.evolution=none
400 rebasing 1:112478962961 "B" (B) 400 rebasing 1:112478962961 "B" (B)
401 not rebasing ignored 2:26805aba1e60 "C" (C) 401 not rebasing ignored 2:26805aba1e60 "C" (C)
402 rebasing 3:f585351a92f8 "D" (D) 402 rebasing 3:f585351a92f8 "D" (D)
403 saved backup bundle to $TESTTMP/b/.hg/strip-backup/f585351a92f8-cb2a9b47-backup.hg (glob) 403 warning: orphaned descendants detected, not stripping 112478962961
404 saved backup bundle to $TESTTMP/b/.hg/strip-backup/f585351a92f8-e536a9e4-rebase.hg (glob)
404 405
405 $ rm .hg/localtags 406 $ rm .hg/localtags
406 $ hg tglog 407 $ hg tglog
407 o 3:draft 'D' 408 o 5:draft 'D'
408 | 409 |
409 o 2:draft 'B' 410 o 4:draft 'B'
410 | 411 |
411 @ 1:draft 'E' 412 @ 3:draft 'E'
412 | 413 |
414 | o 2:draft 'C'
415 | |
416 | o 1:draft 'B'
417 |/
413 o 0:draft 'A' 418 o 0:draft 'A'
414 419
415 Note the above graph is wrong since C got stripped incorrectly.