diff hgext/rebase.py @ 19986:ea81f8b2364e stable

rebase: fix working copy location after a --collapse (issue4080) Rebasing with --collapse would leave the working copy on the parent of the collapsed commit, instead of on the collapsed commit. This fixes that. Also fixes a few tests that already covered this area but had bad data. This also fixes issue3716 where bookmarks are not kept across rebases with --collapse. I updated the test to cover that case as well.
author Durham Goode <durham@fb.com>
date Fri, 01 Nov 2013 17:08:06 -0700
parents 7d5e7799a29f
children a259f7b488ab
line wrap: on
line diff
--- a/hgext/rebase.py	Mon Nov 04 19:59:00 2013 -0800
+++ b/hgext/rebase.py	Fri Nov 01 17:08:06 2013 -0700
@@ -346,6 +346,9 @@
                 commitmsg = ui.edit(commitmsg, repo.ui.username())
             newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg,
                                   extrafn=extrafn, editor=editor)
+            for oldrev in state.iterkeys():
+                if state[oldrev] > nullmerge:
+                    state[oldrev] = newrev
 
         if 'qtip' in repo.tags():
             updatemq(repo, state, skipped, **opts)