Mercurial > hg
comparison hgext/largefiles/lfutil.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 | 6085b7f1536d |
children | 1766130fe9ba |
comparison
equal
deleted
inserted
replaced
46992:5fa019ceb499 | 47012:d55b71393907 |
---|---|
13 import copy | 13 import copy |
14 import os | 14 import os |
15 import stat | 15 import stat |
16 | 16 |
17 from mercurial.i18n import _ | 17 from mercurial.i18n import _ |
18 from mercurial.node import ( | 18 from mercurial.node import hex |
19 hex, | |
20 nullid, | |
21 ) | |
22 from mercurial.pycompat import open | 19 from mercurial.pycompat import open |
23 | 20 |
24 from mercurial import ( | 21 from mercurial import ( |
25 dirstate, | 22 dirstate, |
26 encoding, | 23 encoding, |
611 unit=_(b'revisions'), | 608 unit=_(b'revisions'), |
612 total=len(missing), | 609 total=len(missing), |
613 ) as progress: | 610 ) as progress: |
614 for i, n in enumerate(missing): | 611 for i, n in enumerate(missing): |
615 progress.update(i) | 612 progress.update(i) |
616 parents = [p for p in repo[n].parents() if p != nullid] | 613 parents = [p for p in repo[n].parents() if p != repo.nullid] |
617 | 614 |
618 with lfstatus(repo, value=False): | 615 with lfstatus(repo, value=False): |
619 ctx = repo[n] | 616 ctx = repo[n] |
620 | 617 |
621 files = set(ctx.files()) | 618 files = set(ctx.files()) |