Show More
@@ -39,7 +39,9 from .revlogutils import ( | |||
|
39 | 39 | |
|
40 | 40 | |
|
41 | 41 | class unionrevlog(revlog.revlog): |
|
42 | def __init__(self, opener, radix, revlog2, linkmapper): | |
|
42 | def __init__(self, opener: typing.Any, radix, revlog2, linkmapper): | |
|
43 | # TODO: figure out real type of opener | |
|
44 | # | |
|
43 | 45 | # How it works: |
|
44 | 46 | # To retrieve a revision, we just need to know the node id so we can |
|
45 | 47 | # look it up in revlog2. |
@@ -49,6 +51,10 class unionrevlog(revlog.revlog): | |||
|
49 | 51 | opener = vfsmod.readonlyvfs(opener) |
|
50 | 52 | target = getattr(revlog2, 'target', None) |
|
51 | 53 | if target is None: |
|
54 | # Help pytype- changelog and revlog are not possible here because | |
|
55 | # they both have a 'target' attr. | |
|
56 | assert not isinstance(revlog2, (changelog.changelog, revlog.revlog)) | |
|
57 | ||
|
52 | 58 | # a revlog wrapper, eg: the manifestlog that is not an actual revlog |
|
53 | 59 | target = revlog2._revlog.target |
|
54 | 60 | revlog.revlog.__init__(self, opener, target=target, radix=radix) |
@@ -131,7 +137,7 class unionrevlog(revlog.revlog): | |||
|
131 | 137 | |
|
132 | 138 | def _chunk(self, rev): |
|
133 | 139 | if rev <= self.repotiprev: |
|
134 |
return revlog. |
|
|
140 | return super(unionrevlog, self)._inner._chunk(rev) | |
|
135 | 141 | return self.revlog2._chunk(self.node(rev)) |
|
136 | 142 | |
|
137 | 143 | def revdiff(self, rev1, rev2): |
General Comments 0
You need to be logged in to leave comments.
Login now