Mercurial > hg
comparison mercurial/store.py @ 46780:6266d19556ad
node: introduce nodeconstants class
In preparing for moving from SHA1 hashes to a modern hash function,
place nullid and other constant magic vules in a class. Provide the
active set of constants in the repository and push it down. Provide
nullid directly in strategic places like the repository as it is
accessed very often. This changeset introduces the API change, but not
the mechanical replacement of the node.py attributes itself.
Differential Revision: https://phab.mercurial-scm.org/D9750
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Wed, 13 Jan 2021 16:14:58 +0100 |
parents | e9901d01d135 |
children | d4ba4d51f85f |
comparison
equal
deleted
inserted
replaced
46779:49fd21f32695 | 46780:6266d19556ad |
---|---|
439 trypending=trypending, | 439 trypending=trypending, |
440 concurrencychecker=concurrencychecker, | 440 concurrencychecker=concurrencychecker, |
441 ) | 441 ) |
442 | 442 |
443 def manifestlog(self, repo, storenarrowmatch): | 443 def manifestlog(self, repo, storenarrowmatch): |
444 rootstore = manifest.manifestrevlog(self.vfs) | 444 rootstore = manifest.manifestrevlog(repo.nodeconstants, self.vfs) |
445 return manifest.manifestlog(self.vfs, repo, rootstore, storenarrowmatch) | 445 return manifest.manifestlog(self.vfs, repo, rootstore, storenarrowmatch) |
446 | 446 |
447 def datafiles(self, matcher=None): | 447 def datafiles(self, matcher=None): |
448 return self._walk(b'data', True) + self._walk(b'meta', True) | 448 return self._walk(b'data', True) + self._walk(b'meta', True) |
449 | 449 |