mercurial/utils/storageutil.py
changeset 47012 d55b71393907
parent 46715 45f0d5297698
child 47077 119790e1c67c
--- a/mercurial/utils/storageutil.py	Mon Apr 19 20:38:52 2021 -0400
+++ b/mercurial/utils/storageutil.py	Mon Mar 29 01:52:06 2021 +0200
@@ -13,8 +13,8 @@
 from ..i18n import _
 from ..node import (
     bin,
-    nullid,
     nullrev,
+    sha1nodeconstants,
 )
 from .. import (
     dagop,
@@ -26,7 +26,7 @@
 from ..revlogutils import sidedata as sidedatamod
 from ..utils import hashutil
 
-_nullhash = hashutil.sha1(nullid)
+_nullhash = hashutil.sha1(sha1nodeconstants.nullid)
 
 
 def hashrevisionsha1(text, p1, p2):
@@ -37,7 +37,7 @@
     content in the revision graph.
     """
     # As of now, if one of the parent node is null, p2 is null
-    if p2 == nullid:
+    if p2 == sha1nodeconstants.nullid:
         # deep copy of a hash is faster than creating one
         s = _nullhash.copy()
         s.update(p1)
@@ -107,7 +107,7 @@
     Returns ``False`` if the file has no copy metadata. Otherwise a
     2-tuple of the source filename and node.
     """
-    if store.parents(node)[0] != nullid:
+    if store.parents(node)[0] != sha1nodeconstants.nullid:
         return False
 
     meta = parsemeta(store.revision(node))[0]