From patchwork Fri Jun 22 11:44:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D3824: cleanupnodes: preserve phase of parents of new nodes From: phabricator X-Patchwork-Id: 32370 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Fri, 22 Jun 2018 11:44:41 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG05b7dd11918e: cleanupnodes: preserve phase of parents of new nodes (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3824?vs=9249&id=9255 REVISION DETAIL https://phab.mercurial-scm.org/D3824 AFFECTED FILES mercurial/scmutil.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -842,13 +842,13 @@ return newphases.get(ctx.node(), ctx.phase()) for newnode in allnewnodes: ctx = unfi[newnode] + parentphase = max(phase(p) for p in ctx.parents()) if targetphase is None: oldphase = max(unfi[oldnode].phase() for oldnode in precursors[newnode]) - parentphase = max(phase(p) for p in ctx.parents()) newphase = max(oldphase, parentphase) else: - newphase = targetphase + newphase = max(targetphase, parentphase) newphases[newnode] = newphase if newphase > ctx.phase(): toretract.setdefault(newphase, []).append(newnode)