Mercurial > hg
comparison tests/test-copy-move-merge.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 | 978b907d9b36 |
children | 26531db4647a |
comparison
equal
deleted
inserted
replaced
33331:4bae3c117b57 | 33332:3b7cb3d17137 |
---|---|
117 | | 117 | |
118 o 0 add a | 118 o 0 add a |
119 | 119 |
120 $ hg rebase -d . -b 2 --config extensions.rebase= --config experimental.disablecopytrace=True | 120 $ hg rebase -d . -b 2 --config extensions.rebase= --config experimental.disablecopytrace=True |
121 rebasing 2:6adcf8c12e7d "copy b->x" | 121 rebasing 2:6adcf8c12e7d "copy b->x" |
122 saved backup bundle to $TESTTMP/copydisable/.hg/strip-backup/6adcf8c12e7d-ce4b3e75-backup.hg (glob) | 122 saved backup bundle to $TESTTMP/copydisable/.hg/strip-backup/6adcf8c12e7d-ce4b3e75-rebase.hg (glob) |
123 $ hg up -q 3 | 123 $ hg up -q 3 |
124 $ hg log -f x -T '{rev} {desc}\n' | 124 $ hg log -f x -T '{rev} {desc}\n' |
125 3 copy b->x | 125 3 copy b->x |
126 1 add b, c | 126 1 add b, c |
127 | 127 |
150 |/ | 150 |/ |
151 o 0 add a | 151 o 0 add a |
152 | 152 |
153 $ hg rebase -d 2 -s 3 --config extensions.rebase= --config experimental.disablecopytrace=True | 153 $ hg rebase -d 2 -s 3 --config extensions.rebase= --config experimental.disablecopytrace=True |
154 rebasing 3:47e1a9e6273b "copy a->b (2)" (tip) | 154 rebasing 3:47e1a9e6273b "copy a->b (2)" (tip) |
155 saved backup bundle to $TESTTMP/copydisable3/.hg/strip-backup/47e1a9e6273b-2d099c59-backup.hg (glob) | 155 saved backup bundle to $TESTTMP/copydisable3/.hg/strip-backup/47e1a9e6273b-2d099c59-rebase.hg (glob) |
156 | 156 |
157 $ hg log -G -f b | 157 $ hg log -G -f b |
158 @ changeset: 3:76024fb4b05b | 158 @ changeset: 3:76024fb4b05b |
159 : tag: tip | 159 : tag: tip |
160 : user: test | 160 : user: test |