[PATCH 1 of 2 STABLE] phases: fix `nullid` reference in newheads

Boris Feld boris.feld at octobus.net
Tue Aug 21 11:35:26 UTC 2018


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1534580656 -7200
#      Sat Aug 18 10:24:16 2018 +0200
# Branch stable
# Node ID 9c019032b49e561cefe8350cdcb51f6ab633caac
# Parent  cee9043c7dba154af10cf2817190f8c1ed62de62
# EXP-Topic perf-phases
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 9c019032b49e
phases: fix `nullid` reference in newheads

Spotted by Yuya Nishihara.

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -673,7 +673,7 @@ def newheads(repo, heads, roots):
     rev = cl.nodemap.get
     if not roots:
         return heads
-    if not heads or heads == [nullrev]:
+    if not heads or heads == [nullid]:
         return []
     # The logic operated on revisions, convert arguments early for convenience
     new_heads = set(rev(n) for n in heads if n != nullid)


More information about the Mercurial-devel mailing list