Mercurial > hg
comparison hgext/lfs/wrapper.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 | 3d740058b467 |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
46992:5fa019ceb499 | 47012:d55b71393907 |
---|---|
8 from __future__ import absolute_import | 8 from __future__ import absolute_import |
9 | 9 |
10 import hashlib | 10 import hashlib |
11 | 11 |
12 from mercurial.i18n import _ | 12 from mercurial.i18n import _ |
13 from mercurial.node import bin, hex, nullid, short | 13 from mercurial.node import bin, hex, short |
14 from mercurial.pycompat import ( | 14 from mercurial.pycompat import ( |
15 getattr, | 15 getattr, |
16 setattr, | 16 setattr, |
17 ) | 17 ) |
18 | 18 |
156 # both None - likely working copy content where node is not ready | 156 # both None - likely working copy content where node is not ready |
157 return False | 157 return False |
158 rev = rlog.rev(node) | 158 rev = rlog.rev(node) |
159 else: | 159 else: |
160 node = rlog.node(rev) | 160 node = rlog.node(rev) |
161 if node == nullid: | 161 if node == rlog.nullid: |
162 return False | 162 return False |
163 flags = rlog.flags(rev) | 163 flags = rlog.flags(rev) |
164 return bool(flags & revlog.REVIDX_EXTSTORED) | 164 return bool(flags & revlog.REVIDX_EXTSTORED) |
165 | 165 |
166 | 166 |