Mercurial > hg-stable
diff tests/test-rebase-bookmarks.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 | 79437fb352ce |
children | 2f427b57bf90 4f969b9e0cf5 |
line wrap: on
line diff
--- a/tests/test-rebase-bookmarks.t Mon Jun 26 13:13:51 2017 -0700 +++ b/tests/test-rebase-bookmarks.t Fri Jul 07 18:51:46 2017 -0700 @@ -75,7 +75,7 @@ $ hg rebase -s Y -d 3 rebasing 2:49cb3485fa0c "C" (Y Z) - saved backup bundle to $TESTTMP/a1/.hg/strip-backup/49cb3485fa0c-126f3e97-backup.hg (glob) + saved backup bundle to $TESTTMP/a1/.hg/strip-backup/49cb3485fa0c-126f3e97-rebase.hg (glob) $ hg tglog @ 3: 'C' bookmarks: Y Z @@ -97,7 +97,7 @@ $ hg rebase -s W -d . rebasing 3:41acb9dca9eb "D" (tip W) - saved backup bundle to $TESTTMP/a4/.hg/strip-backup/41acb9dca9eb-b35a6a63-backup.hg (glob) + saved backup bundle to $TESTTMP/a4/.hg/strip-backup/41acb9dca9eb-b35a6a63-rebase.hg (glob) $ hg bookmarks W 3:0d3554f74897 @@ -116,7 +116,7 @@ $ hg rebase -s 1 -d 3 rebasing 1:6c81ed0049f8 "B" (X) rebasing 2:49cb3485fa0c "C" (Y Z) - saved backup bundle to $TESTTMP/a2/.hg/strip-backup/6c81ed0049f8-a687065f-backup.hg (glob) + saved backup bundle to $TESTTMP/a2/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob) $ hg tglog @ 3: 'C' bookmarks: Y Z @@ -139,7 +139,7 @@ $ hg rebase -d W rebasing 1:6c81ed0049f8 "B" (X) rebasing 2:49cb3485fa0c "C" (Y Z) - saved backup bundle to $TESTTMP/a3/.hg/strip-backup/6c81ed0049f8-a687065f-backup.hg (glob) + saved backup bundle to $TESTTMP/a3/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob) $ hg tglog o 3: 'C' bookmarks: Y Z @@ -179,7 +179,7 @@ continue: hg rebase --continue $ hg rebase --continue rebasing 3:3d5fa227f4b5 "C" (Y Z) - saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-c6ea2371-backup.hg (glob) + saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-c6ea2371-rebase.hg (glob) $ hg tglog @ 4: 'C' bookmarks: Y Z | @@ -209,4 +209,4 @@ rebasing 5:345c90f326a4 "bisect" rebasing 6:f677a2907404 "bisect2" rebasing 7:325c16001345 "bisect3" (tip bisect) - saved backup bundle to $TESTTMP/a3/.hg/strip-backup/345c90f326a4-b4840586-backup.hg (glob) + saved backup bundle to $TESTTMP/a3/.hg/strip-backup/345c90f326a4-b4840586-rebase.hg (glob)