revlog: mark nullhash as module-private
No other module should ever need this, so mark it with _ so nobody
tries to use it.
--- 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