revlog: mark nullhash as module-private
authorAugie Fackler <raf@durin42.com>
Wed, 24 Sep 2014 15:10:52 -0400
changeset 22784 0f4e655136ef
parent 22783 524b786bd54f
child 22785 abc44fcc9c57
revlog: mark nullhash as module-private No other module should ever need this, so mark it with _ so nobody tries to use it.
mercurial/revlog.py
--- a/mercurial/revlog.py	Wed Oct 08 20:51:01 2014 +0900
+++ b/mercurial/revlog.py	Wed Sep 24 15:10:52 2014 -0400
@@ -52,7 +52,7 @@
 def offset_type(offset, type):
     return long(long(offset) << 16 | type)
 
-nullhash = _sha(nullid)
+_nullhash = _sha(nullid)
 
 def hash(text, p1, p2):
     """generate a hash from the given text and its parent hashes
@@ -64,7 +64,7 @@
     # As of now, if one of the parent node is null, p2 is null
     if p2 == nullid:
         # deep copy of a hash is faster than creating one
-        s = nullhash.copy()
+        s = _nullhash.copy()
         s.update(p1)
     else:
         # none of the parent nodes are nullid