Patchwork rebase: don't update state dict same way for each root

login
register
mail settings
Submitter via Mercurial-devel
Date March 11, 2017, 8:32 p.m.
Message ID <d8fc11529f3f9746742c.1489264375@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/19109/
State Changes Requested
Headers show

Comments

via Mercurial-devel - March 11, 2017, 8:32 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1489263956 28800
#      Sat Mar 11 12:25:56 2017 -0800
# Node ID d8fc11529f3f9746742c34b3089dadc86632c148
# Parent  0c8a042b193d9f19a1ba161a861f2647ae8eb80a
rebase: don't update state dict same way for each root

Patch

diff -r 0c8a042b193d -r d8fc11529f3f hgext/rebase.py
--- a/hgext/rebase.py	Thu Mar 09 20:53:14 2017 -0800
+++ b/hgext/rebase.py	Sat Mar 11 12:25:56 2017 -0800
@@ -1230,7 +1230,6 @@ 
                 return None
 
         repo.ui.debug('rebase onto %s starting from %s\n' % (dest, root))
-        state.update(dict.fromkeys(rebaseset, revtodo))
         # Rebase tries to turn <dest> into a parent of <root> while
         # preserving the number of parents of rebased changesets:
         #
@@ -1272,6 +1271,7 @@ 
             # ancestors of <root> not ancestors of <dest>
             detachset.update(repo.changelog.findmissingrevs([commonbase.rev()],
                                                             [root.rev()]))
+    state.update(dict.fromkeys(rebaseset, revtodo))
     for r in detachset:
         if r not in state:
             state[r] = nullmerge