diff tests/testlib/ext-sidedata.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 ba8e508a8e69
children 27f1191b1305
line wrap: on
line diff
--- a/tests/testlib/ext-sidedata.py	Mon Apr 19 20:38:52 2021 -0400
+++ b/tests/testlib/ext-sidedata.py	Mon Mar 29 01:52:06 2021 +0200
@@ -10,10 +10,7 @@
 import hashlib
 import struct
 
-from mercurial.node import (
-    nullid,
-    nullrev,
-)
+from mercurial.node import nullrev
 from mercurial import (
     extensions,
     requirements,
@@ -46,7 +43,7 @@
         return text, sd
     if self.version & 0xFFFF != 2:
         return text, sd
-    if nodeorrev != nullrev and nodeorrev != nullid:
+    if nodeorrev != nullrev and nodeorrev != self.nullid:
         cat1 = sd.get(sidedata.SD_TEST1)
         if cat1 is not None and len(text) != struct.unpack('>I', cat1)[0]:
             raise RuntimeError('text size mismatch')