##// END OF EJS Templates
bundlerepo: fix mismatches with repository and revlog classes...
Matt Harbison -
r52764:cfd30df0 default
parent child Browse files
Show More
@@ -55,7 +55,11 from .revlogutils import (
55 55
56 56
57 57 class bundlerevlog(revlog.revlog):
58 def __init__(self, opener, target, radix, cgunpacker, linkmapper):
58 def __init__(
59 self, opener: typing.Any, target, radix, cgunpacker, linkmapper
60 ):
61 # TODO: figure out real type of opener
62 #
59 63 # How it works:
60 64 # To retrieve a revision, we need to know the offset of the revision in
61 65 # the bundle (an unbundle object). We store this offset in the index
@@ -124,7 +128,7 class bundlerevlog(revlog.revlog):
124 128 # delta base, not against rev - 1
125 129 # XXX: could use some caching
126 130 if rev <= self.repotiprev:
127 return revlog.revlog._chunk(self, rev)
131 return super(bundlerevlog, self)._inner._chunk(rev)
128 132 self.bundle.seek(self.start(rev))
129 133 return self.bundle.read(self.length(rev))
130 134
@@ -265,10 +269,10 class bundlephasecache(phases.phasecache
265 269 if hasattr(self, 'opener'):
266 270 self.opener = vfsmod.readonlyvfs(self.opener)
267 271
268 def write(self):
272 def write(self, repo):
269 273 raise NotImplementedError
270 274
271 def _write(self, fp):
275 def _write(self, repo, fp):
272 276 raise NotImplementedError
273 277
274 278 def _updateroots(self, repo, phase, newroots, tr, invalidate=True):
@@ -1310,6 +1310,7 class revlog:
1310 1310 """
1311 1311
1312 1312 _flagserrorclass = error.RevlogError
1313 _inner: "_InnerRevlog"
1313 1314
1314 1315 opener: vfsmod.vfs
1315 1316
General Comments 0
You need to be logged in to leave comments. Login now