Mercurial > hg
diff hgext/rebase.py @ 44666:e7af56a0733e
rebase: don't create merge when continuing rebase interrupted by old hg
This fixes the bug described and demonstrated in the previous
commit. It does so by practically undoing 8082a77cc3a2 (rebase: remove
some redundant setting of dirstate parents, 2020-01-10).
Differential Revision: https://phab.mercurial-scm.org/D8356
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 01 Apr 2020 14:34:21 -0700 |
parents | f63598aa1c4b |
children | b7808443ed6a 1f114c797961 |
line wrap: on
line diff
--- a/hgext/rebase.py Wed Apr 01 13:27:28 2020 -0700 +++ b/hgext/rebase.py Wed Apr 01 14:34:21 2020 -0700 @@ -631,6 +631,12 @@ editor = cmdutil.getcommiteditor( editform=editform, **pycompat.strkwargs(opts) ) + # We need to set parents again here just in case we're continuing + # a rebase started with an old hg version (before 9c9cfecd4600), + # because those old versions would have left us with two dirstate + # parents, and we don't want to create a merge commit here (unless + # we're rebasing a merge commit). + self.wctx.setparents(repo[p1].node(), repo[p2].node()) newnode = self._concludenode(rev, p1, editor) else: # Skip commit if we are collapsing