comparison tests/test-rebase-dest.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 ae6bab095c66
children 5e83a8fe6bc4
comparison
equal deleted inserted replaced
33331:4bae3c117b57 33332:3b7cb3d17137
19 abort: you must specify a destination 19 abort: you must specify a destination
20 (use: hg rebase -d REV) 20 (use: hg rebase -d REV)
21 [255] 21 [255]
22 $ hg rebase -d 1 22 $ hg rebase -d 1
23 rebasing 2:5db65b93a12b "cc" (tip) 23 rebasing 2:5db65b93a12b "cc" (tip)
24 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/5db65b93a12b-4fb789ec-backup.hg (glob) 24 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/5db65b93a12b-4fb789ec-rebase.hg (glob)
25 $ hg rebase -d 0 -r . -q 25 $ hg rebase -d 0 -r . -q
26 $ HGPLAIN=1 hg rebase 26 $ HGPLAIN=1 hg rebase
27 rebasing 2:889b0bc6a730 "cc" (tip) 27 rebasing 2:889b0bc6a730 "cc" (tip)
28 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/889b0bc6a730-41ec4f81-backup.hg (glob) 28 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/889b0bc6a730-41ec4f81-rebase.hg (glob)
29 $ hg rebase -d 0 -r . -q 29 $ hg rebase -d 0 -r . -q
30 $ hg --config commands.rebase.requiredest=False rebase 30 $ hg --config commands.rebase.requiredest=False rebase
31 rebasing 2:279de9495438 "cc" (tip) 31 rebasing 2:279de9495438 "cc" (tip)
32 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/279de9495438-ab0a5128-backup.hg (glob) 32 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/279de9495438-ab0a5128-rebase.hg (glob)
33 33
34 Requiring dest should not break continue or other rebase options 34 Requiring dest should not break continue or other rebase options
35 $ hg up 1 -q 35 $ hg up 1 -q
36 $ echo d >> c 36 $ echo d >> c
37 $ hg commit -qAm dc 37 $ hg commit -qAm dc
54 $ hg resolve --mark --all 54 $ hg resolve --mark --all
55 (no more unresolved files) 55 (no more unresolved files)
56 continue: hg rebase --continue 56 continue: hg rebase --continue
57 $ hg rebase --continue 57 $ hg rebase --continue
58 rebasing 3:0537f6b50def "dc" (tip) 58 rebasing 3:0537f6b50def "dc" (tip)
59 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0537f6b50def-be4c7386-backup.hg (glob) 59 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0537f6b50def-be4c7386-rebase.hg (glob)
60 60
61 $ cd .. 61 $ cd ..
62 62
63 Check rebase.requiredest interaction with pull --rebase 63 Check rebase.requiredest interaction with pull --rebase
64 $ hg clone repo clone 64 $ hg clone repo clone