Show More
@@ -55,7 +55,11 from .revlogutils import ( | |||||
55 |
|
55 | |||
56 |
|
56 | |||
57 | class bundlerevlog(revlog.revlog): |
|
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 | # How it works: |
|
63 | # How it works: | |
60 | # To retrieve a revision, we need to know the offset of the revision in |
|
64 | # To retrieve a revision, we need to know the offset of the revision in | |
61 | # the bundle (an unbundle object). We store this offset in the index |
|
65 | # the bundle (an unbundle object). We store this offset in the index | |
@@ -124,7 +128,7 class bundlerevlog(revlog.revlog): | |||||
124 | # delta base, not against rev - 1 |
|
128 | # delta base, not against rev - 1 | |
125 | # XXX: could use some caching |
|
129 | # XXX: could use some caching | |
126 | if rev <= self.repotiprev: |
|
130 | if rev <= self.repotiprev: | |
127 |
return revlog. |
|
131 | return super(bundlerevlog, self)._inner._chunk(rev) | |
128 | self.bundle.seek(self.start(rev)) |
|
132 | self.bundle.seek(self.start(rev)) | |
129 | return self.bundle.read(self.length(rev)) |
|
133 | return self.bundle.read(self.length(rev)) | |
130 |
|
134 | |||
@@ -265,10 +269,10 class bundlephasecache(phases.phasecache | |||||
265 | if hasattr(self, 'opener'): |
|
269 | if hasattr(self, 'opener'): | |
266 | self.opener = vfsmod.readonlyvfs(self.opener) |
|
270 | self.opener = vfsmod.readonlyvfs(self.opener) | |
267 |
|
271 | |||
268 | def write(self): |
|
272 | def write(self, repo): | |
269 | raise NotImplementedError |
|
273 | raise NotImplementedError | |
270 |
|
274 | |||
271 | def _write(self, fp): |
|
275 | def _write(self, repo, fp): | |
272 | raise NotImplementedError |
|
276 | raise NotImplementedError | |
273 |
|
277 | |||
274 | def _updateroots(self, repo, phase, newroots, tr, invalidate=True): |
|
278 | def _updateroots(self, repo, phase, newroots, tr, invalidate=True): |
General Comments 0
You need to be logged in to leave comments.
Login now