Show More
@@ -120,7 +120,7 b' class bundlerevlog(revlog.revlog):' | |||
|
120 | 120 | chain.append(iterrev) |
|
121 | 121 | iterrev = self.index[iterrev][3] |
|
122 | 122 | if text is None: |
|
123 |
text = |
|
|
123 | text = self.baserevision(iterrev) | |
|
124 | 124 | |
|
125 | 125 | while chain: |
|
126 | 126 | delta = self._chunk(chain.pop()) |
@@ -130,6 +130,12 b' class bundlerevlog(revlog.revlog):' | |||
|
130 | 130 | self._cache = (node, rev, text) |
|
131 | 131 | return text |
|
132 | 132 | |
|
133 | def baserevision(self, nodeorrev): | |
|
134 | # Revlog subclasses may override 'revision' method to modify format of | |
|
135 | # content retrieved from revlog. To use bundlerevlog with such class one | |
|
136 | # needs to override 'baserevision' and make more specific call here. | |
|
137 | return revlog.revlog.revision(self, nodeorrev) | |
|
138 | ||
|
133 | 139 | def addrevision(self, text, transaction, link, p1=None, p2=None, d=None): |
|
134 | 140 | raise NotImplementedError |
|
135 | 141 | def addgroup(self, revs, linkmapper, transaction): |
@@ -146,12 +152,21 b' class bundlechangelog(bundlerevlog, chan' | |||
|
146 | 152 | bundlerevlog.__init__(self, opener, self.indexfile, bundle, |
|
147 | 153 | linkmapper) |
|
148 | 154 | |
|
155 | def baserevision(self, nodeorrev): | |
|
156 | # Although changelog doesn't override 'revision' method, some extensions | |
|
157 | # may replace this class with another that does. Same story with | |
|
158 | # manifest and filelog classes. | |
|
159 | return changelog.changelog.revision(self, nodeorrev) | |
|
160 | ||
|
149 | 161 | class bundlemanifest(bundlerevlog, manifest.manifest): |
|
150 | 162 | def __init__(self, opener, bundle, linkmapper): |
|
151 | 163 | manifest.manifest.__init__(self, opener) |
|
152 | 164 | bundlerevlog.__init__(self, opener, self.indexfile, bundle, |
|
153 | 165 | linkmapper) |
|
154 | 166 | |
|
167 | def baserevision(self, nodeorrev): | |
|
168 | return manifest.manifest.revision(self, nodeorrev) | |
|
169 | ||
|
155 | 170 | class bundlefilelog(bundlerevlog, filelog.filelog): |
|
156 | 171 | def __init__(self, opener, path, bundle, linkmapper, repo): |
|
157 | 172 | filelog.filelog.__init__(self, opener, path) |
@@ -159,6 +174,9 b' class bundlefilelog(bundlerevlog, filelo' | |||
|
159 | 174 | linkmapper) |
|
160 | 175 | self._repo = repo |
|
161 | 176 | |
|
177 | def baserevision(self, nodeorrev): | |
|
178 | return filelog.filelog.revision(self, nodeorrev) | |
|
179 | ||
|
162 | 180 | def _file(self, f): |
|
163 | 181 | self._repo.file(f) |
|
164 | 182 |
General Comments 0
You need to be logged in to leave comments.
Login now