Mercurial > hg
comparison mercurial/metadata.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 | 433cef8f3104 |
children | 64cd1496bb70 |
comparison
equal
deleted
inserted
replaced
46992:5fa019ceb499 | 47012:d55b71393907 |
---|---|
9 from __future__ import absolute_import, print_function | 9 from __future__ import absolute_import, print_function |
10 | 10 |
11 import multiprocessing | 11 import multiprocessing |
12 import struct | 12 import struct |
13 | 13 |
14 from .node import ( | 14 from .node import nullrev |
15 nullid, | |
16 nullrev, | |
17 ) | |
18 from . import ( | 15 from . import ( |
19 error, | 16 error, |
20 pycompat, | 17 pycompat, |
21 requirements as requirementsmod, | 18 requirements as requirementsmod, |
22 util, | 19 util, |
615 return merged | 612 return merged |
616 for f in ctx.files(): | 613 for f in ctx.files(): |
617 if f in ctx: | 614 if f in ctx: |
618 fctx = ctx[f] | 615 fctx = ctx[f] |
619 parents = fctx._filelog.parents(fctx._filenode) | 616 parents = fctx._filelog.parents(fctx._filenode) |
620 if parents[1] != nullid: | 617 if parents[1] != ctx.repo().nullid: |
621 merged.append(f) | 618 merged.append(f) |
622 return merged | 619 return merged |
623 | 620 |
624 | 621 |
625 def computechangesetcopies(ctx): | 622 def computechangesetcopies(ctx): |