From patchwork Wed Oct 8 17:06:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,5,manifest-cleanup] revlog: mark nullhash as module-private From: Augie Fackler X-Patchwork-Id: 6157 Message-Id: <9f8980f8de75b63b27d9.1412788009@augie-macbookair> To: mercurial-devel@selenic.com Date: Wed, 08 Oct 2014 13:06:49 -0400 # HG changeset patch # User Augie Fackler # Date 1411585852 14400 # Wed Sep 24 15:10:52 2014 -0400 # Node ID 9f8980f8de75b63b27d92780ef504cef1f9c9b0f # Parent a1eb21f5caea4366310e32aa85248791d5bbfa0c revlog: mark nullhash as module-private No other module should ever need this, so mark it with _ so nobody tries to use it. diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -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