156 |
156 |
157 def baserevision(self, nodeorrev): |
157 def baserevision(self, nodeorrev): |
158 # Revlog subclasses may override 'revision' method to modify format of |
158 # Revlog subclasses may override 'revision' method to modify format of |
159 # content retrieved from revlog. To use bundlerevlog with such class one |
159 # content retrieved from revlog. To use bundlerevlog with such class one |
160 # needs to override 'baserevision' and make more specific call here. |
160 # needs to override 'baserevision' and make more specific call here. |
161 return revlog.revlog.revision(self, nodeorrev) |
161 return revlog.revlog.revision(self, nodeorrev, raw=True) |
162 |
162 |
163 def addrevision(self, text, transaction, link, p1=None, p2=None, d=None): |
163 def addrevision(self, text, transaction, link, p1=None, p2=None, d=None): |
164 raise NotImplementedError |
164 raise NotImplementedError |
165 def addgroup(self, revs, linkmapper, transaction): |
165 def addgroup(self, revs, linkmapper, transaction): |
166 raise NotImplementedError |
166 raise NotImplementedError |
184 # This bypasses filtering on changelog.node() and rev() because we need |
184 # This bypasses filtering on changelog.node() and rev() because we need |
185 # revision text of the bundle base even if it is hidden. |
185 # revision text of the bundle base even if it is hidden. |
186 oldfilter = self.filteredrevs |
186 oldfilter = self.filteredrevs |
187 try: |
187 try: |
188 self.filteredrevs = () |
188 self.filteredrevs = () |
189 return changelog.changelog.revision(self, nodeorrev) |
189 return changelog.changelog.revision(self, nodeorrev, raw=True) |
190 finally: |
190 finally: |
191 self.filteredrevs = oldfilter |
191 self.filteredrevs = oldfilter |
192 |
192 |
193 class bundlemanifest(bundlerevlog, manifest.manifestrevlog): |
193 class bundlemanifest(bundlerevlog, manifest.manifestrevlog): |
194 def __init__(self, opener, bundle, linkmapper, dirlogstarts=None, dir=''): |
194 def __init__(self, opener, bundle, linkmapper, dirlogstarts=None, dir=''): |
208 node = self.node(node) |
208 node = self.node(node) |
209 |
209 |
210 if node in self.fulltextcache: |
210 if node in self.fulltextcache: |
211 result = '%s' % self.fulltextcache[node] |
211 result = '%s' % self.fulltextcache[node] |
212 else: |
212 else: |
213 result = manifest.manifestrevlog.revision(self, nodeorrev) |
213 result = manifest.manifestrevlog.revision(self, nodeorrev, raw=True) |
214 return result |
214 return result |
215 |
215 |
216 def dirlog(self, d): |
216 def dirlog(self, d): |
217 if d in self._dirlogstarts: |
217 if d in self._dirlogstarts: |
218 self.bundle.seek(self._dirlogstarts[d]) |
218 self.bundle.seek(self._dirlogstarts[d]) |
226 filelog.filelog.__init__(self, opener, path) |
226 filelog.filelog.__init__(self, opener, path) |
227 bundlerevlog.__init__(self, opener, self.indexfile, bundle, |
227 bundlerevlog.__init__(self, opener, self.indexfile, bundle, |
228 linkmapper) |
228 linkmapper) |
229 |
229 |
230 def baserevision(self, nodeorrev): |
230 def baserevision(self, nodeorrev): |
231 return filelog.filelog.revision(self, nodeorrev) |
231 return filelog.filelog.revision(self, nodeorrev, raw=True) |
232 |
232 |
233 class bundlepeer(localrepo.localpeer): |
233 class bundlepeer(localrepo.localpeer): |
234 def canpush(self): |
234 def canpush(self): |
235 return False |
235 return False |
236 |
236 |