Mercurial > hg
comparison hgext/remotefilelog/shallowrepo.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 | 89a2afe31e82 |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
46992:5fa019ceb499 | 47012:d55b71393907 |
---|---|
7 from __future__ import absolute_import | 7 from __future__ import absolute_import |
8 | 8 |
9 import os | 9 import os |
10 | 10 |
11 from mercurial.i18n import _ | 11 from mercurial.i18n import _ |
12 from mercurial.node import hex, nullid, nullrev | 12 from mercurial.node import hex, nullrev |
13 from mercurial import ( | 13 from mercurial import ( |
14 encoding, | 14 encoding, |
15 error, | 15 error, |
16 localrepo, | 16 localrepo, |
17 match, | 17 match, |
204 if not ctx.manifestnode(): | 204 if not ctx.manifestnode(): |
205 # prefetch files that will likely be compared | 205 # prefetch files that will likely be compared |
206 m1 = ctx.p1().manifest() | 206 m1 = ctx.p1().manifest() |
207 files = [] | 207 files = [] |
208 for f in ctx.modified() + ctx.added(): | 208 for f in ctx.modified() + ctx.added(): |
209 fparent1 = m1.get(f, nullid) | 209 fparent1 = m1.get(f, self.nullid) |
210 if fparent1 != nullid: | 210 if fparent1 != self.nullid: |
211 files.append((f, hex(fparent1))) | 211 files.append((f, hex(fparent1))) |
212 self.fileservice.prefetch(files) | 212 self.fileservice.prefetch(files) |
213 return super(shallowrepository, self).commitctx( | 213 return super(shallowrepository, self).commitctx( |
214 ctx, error=error, origctx=origctx | 214 ctx, error=error, origctx=origctx |
215 ) | 215 ) |