comparison tests/test-rebase-mq.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 157675d0f600
children 469b06b4c3ca
comparison
equal deleted inserted replaced
33331:4bae3c117b57 33332:3b7cb3d17137
86 (no more unresolved files) 86 (no more unresolved files)
87 continue: hg rebase --continue 87 continue: hg rebase --continue
88 $ hg rebase -c 88 $ hg rebase -c
89 already rebased 2:3504f44bffc0 "P0" (f.patch qbase) as ebe9914c0d1c 89 already rebased 2:3504f44bffc0 "P0" (f.patch qbase) as ebe9914c0d1c
90 rebasing 3:929394423cd3 "P1" (f2.patch qtip) 90 rebasing 3:929394423cd3 "P1" (f2.patch qtip)
91 saved backup bundle to $TESTTMP/a/.hg/strip-backup/3504f44bffc0-30595b40-backup.hg (glob) 91 saved backup bundle to $TESTTMP/a/.hg/strip-backup/3504f44bffc0-30595b40-rebase.hg (glob)
92 92
93 $ hg tglog 93 $ hg tglog
94 @ 3: 'P1' tags: f2.patch qtip tip 94 @ 3: 'P1' tags: f2.patch qtip tip
95 | 95 |
96 o 2: 'P0' tags: f.patch qbase 96 o 2: 'P0' tags: f.patch qbase
203 Rebase the applied mq patches: 203 Rebase the applied mq patches:
204 204
205 $ hg rebase -s 2 -d 1 205 $ hg rebase -s 2 -d 1
206 rebasing 2:0c587ffcb480 "P0 (git)" (f_git.patch qbase) 206 rebasing 2:0c587ffcb480 "P0 (git)" (f_git.patch qbase)
207 rebasing 3:c7f18665e4bc "P1" (f.patch qtip tip) 207 rebasing 3:c7f18665e4bc "P1" (f.patch qtip tip)
208 saved backup bundle to $TESTTMP/a/.hg/strip-backup/0c587ffcb480-0ea5695f-backup.hg (glob) 208 saved backup bundle to $TESTTMP/a/.hg/strip-backup/0c587ffcb480-0ea5695f-rebase.hg (glob)
209 209
210 $ hg qci -m 'save patch state' 210 $ hg qci -m 'save patch state'
211 211
212 $ hg qseries -s 212 $ hg qseries -s
213 f_git.patch: P0 (git) 213 f_git.patch: P0 (git)