Mercurial > public > mercurial-scm > hg-stable
diff hgext/remotefilelog/datapack.py @ 47055: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 | 9d2b2df2c2ba |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/hgext/remotefilelog/datapack.py Mon Apr 19 20:38:52 2021 -0400 +++ b/hgext/remotefilelog/datapack.py Mon Mar 29 01:52:06 2021 +0200 @@ -3,7 +3,10 @@ import struct import zlib -from mercurial.node import hex, nullid +from mercurial.node import ( + hex, + sha1nodeconstants, +) from mercurial.i18n import _ from mercurial import ( pycompat, @@ -458,7 +461,7 @@ rawindex = b'' fmt = self.INDEXFORMAT for node, deltabase, offset, size in entries: - if deltabase == nullid: + if deltabase == sha1nodeconstants.nullid: deltabaselocation = FULLTEXTINDEXMARK else: # Instead of storing the deltabase node in the index, let's