Mercurial > hg
comparison hgext/remotefilelog/metadatastore.py @ 47012: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 | 9f70512ae2cf |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
46992:5fa019ceb499 | 47012:d55b71393907 |
---|---|
1 from __future__ import absolute_import | 1 from __future__ import absolute_import |
2 | 2 |
3 from mercurial.node import hex, nullid | 3 from mercurial.node import ( |
4 hex, | |
5 sha1nodeconstants, | |
6 ) | |
4 from . import ( | 7 from . import ( |
5 basestore, | 8 basestore, |
6 shallowutil, | 9 shallowutil, |
7 ) | 10 ) |
8 | 11 |
49 value = ancestors.get(node) | 52 value = ancestors.get(node) |
50 if not value: | 53 if not value: |
51 missing.append((name, node)) | 54 missing.append((name, node)) |
52 continue | 55 continue |
53 p1, p2, linknode, copyfrom = value | 56 p1, p2, linknode, copyfrom = value |
54 if p1 != nullid and p1 not in known: | 57 if p1 != sha1nodeconstants.nullid and p1 not in known: |
55 queue.append((copyfrom or curname, p1)) | 58 queue.append((copyfrom or curname, p1)) |
56 if p2 != nullid and p2 not in known: | 59 if p2 != sha1nodeconstants.nullid and p2 not in known: |
57 queue.append((curname, p2)) | 60 queue.append((curname, p2)) |
58 return missing | 61 return missing |
59 | 62 |
60 missing = [(name, node)] | 63 missing = [(name, node)] |
61 while missing: | 64 while missing: |