hgext/rebase.py
changeset 33849 3ae2eaecb49e
parent 33848 bc9e075133c9
child 33863 3160876c6e4e
--- a/hgext/rebase.py	Fri Aug 11 01:36:59 2017 -0700
+++ b/hgext/rebase.py	Fri Aug 11 01:08:07 2017 -0700
@@ -916,12 +916,13 @@
         |/          |/
         A           A
     """
+    # pick already rebased revs from state
+    source = [s for s, d in state.items() if d > 0]
+
     result = []
     for prev in repo.changelog.parentrevs(rev):
         adjusted = dest
         if prev != nullrev:
-            # pick already rebased revs from state
-            source = [s for s, d in state.items() if d > 0]
             candidate = repo.revs('max(%ld and (::%d))', source, prev).first()
             if candidate is not None:
                 adjusted = state[candidate]