Mercurial > public > mercurial-scm > hg-stable
diff mercurial/phases.py @ 47055:d55b71393907
node: replace nullid and friends with nodeconstants class
The introduction of 256bit hashes require changes to nullid and other
constant magic values. Start pushing them down from repository and
revlog where sensible.
Differential Revision: https://phab.mercurial-scm.org/D9465
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Mon, 29 Mar 2021 01:52:06 +0200 |
parents | 77e129be10de |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/mercurial/phases.py Mon Apr 19 20:38:52 2021 -0400 +++ b/mercurial/phases.py Mon Mar 29 01:52:06 2021 +0200 @@ -109,7 +109,6 @@ from .node import ( bin, hex, - nullid, nullrev, short, wdirrev, @@ -862,7 +861,7 @@ node = bin(nhex) phase = int(phase) if phase == public: - if node != nullid: + if node != repo.nullid: repo.ui.warn( _( b'ignoring inconsistent public root' @@ -919,10 +918,10 @@ rev = cl.index.get_rev if not roots: return heads - if not heads or heads == [nullid]: + if not heads or heads == [repo.nullid]: return [] # The logic operated on revisions, convert arguments early for convenience - new_heads = {rev(n) for n in heads if n != nullid} + new_heads = {rev(n) for n in heads if n != repo.nullid} roots = [rev(n) for n in roots] # compute the area we need to remove affected_zone = repo.revs(b"(%ld::%ld)", roots, new_heads)