Mercurial > public > mercurial-scm > hg
diff mercurial/verify.py @ 47012: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 | 6085b7f1536d |
children | bc138f2a2e47 |
line wrap: on
line diff
--- a/mercurial/verify.py Mon Apr 19 20:38:52 2021 -0400 +++ b/mercurial/verify.py Mon Mar 29 01:52:06 2021 +0200 @@ -10,13 +10,8 @@ import os from .i18n import _ -from .node import ( - nullid, - short, -) -from .utils import ( - stringutil, -) +from .node import short +from .utils import stringutil from . import ( error, @@ -159,13 +154,13 @@ try: p1, p2 = obj.parents(node) - if p1 not in seen and p1 != nullid: + if p1 not in seen and p1 != self.repo.nullid: self._err( lr, _(b"unknown parent 1 %s of %s") % (short(p1), short(node)), f, ) - if p2 not in seen and p2 != nullid: + if p2 not in seen and p2 != self.repo.nullid: self._err( lr, _(b"unknown parent 2 %s of %s") % (short(p2), short(node)), @@ -267,7 +262,7 @@ try: changes = cl.read(n) - if changes[0] != nullid: + if changes[0] != self.repo.nullid: mflinkrevs.setdefault(changes[0], []).append(i) self.refersmf = True for f in changes[3]: @@ -598,7 +593,7 @@ % (rp[0], short(rp[1])), f, ) - elif rp[1] == nullid: + elif rp[1] == self.repo.nullid: ui.note( _( b"warning: %s@%s: copy source"