diff hgext/rebase.py @ 36981:177f3b90335f stable

rebase: on abort, don't strip commits that didn't need rebased (issue5822) I clearly missed adding this condition in 78496ac30025 (rebase: allow rebase even if some revisions need no rebase (BC) (issue5422), 2017-05-11). Perhaps I should have opted for the "revdone" solution I mentioned there... Differential Revision: https://phab.mercurial-scm.org/D2879
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 15 Mar 2018 22:35:07 -0700
parents a046d6890761
children c83e2736c6de
line wrap: on
line diff
--- a/hgext/rebase.py	Thu Mar 15 21:40:51 2018 -0700
+++ b/hgext/rebase.py	Thu Mar 15 22:35:07 2018 -0700
@@ -1544,7 +1544,8 @@
         # If the first commits in the rebased set get skipped during the rebase,
         # their values within the state mapping will be the dest rev id. The
         # rebased list must must not contain the dest rev (issue4896)
-        rebased = [s for r, s in state.items() if s >= 0 and s != destmap[r]]
+        rebased = [s for r, s in state.items()
+                   if s >= 0 and s != r and s != destmap[r]]
         immutable = [d for d in rebased if not repo[d].mutable()]
         cleanup = True
         if immutable: