comparison mercurial/unionrepo.py @ 30218:1767723f71cf stable

manifest: move manifest creation to a helper function A future patch will be moving manifest creation to be inside manifestlog as part of improving our cache guarantees. bundlerepo and unionrepo currently rely on being able to hook into manifest creation, so let's temporarily move the actual manifest creation to a helper function for them to intercept. In the future manifest.manifest() will disappear entirely and this can disappear.
author Durham Goode <durham@fb.com>
date Tue, 18 Oct 2016 17:32:51 -0700
parents b966e35aad78
children f2d146d1e8d6
comparison
equal deleted inserted replaced
30217:e478f11e4182 30218:1767723f71cf
206 def _clrev(self, rev2): 206 def _clrev(self, rev2):
207 """map from repo2 changelog rev to temporary rev in self.changelog""" 207 """map from repo2 changelog rev to temporary rev in self.changelog"""
208 node = self.repo2.changelog.node(rev2) 208 node = self.repo2.changelog.node(rev2)
209 return self.changelog.rev(node) 209 return self.changelog.rev(node)
210 210
211 @localrepo.unfilteredpropertycache 211 def _constructmanifest(self):
212 def manifest(self):
213 return unionmanifest(self.svfs, self.repo2.svfs, 212 return unionmanifest(self.svfs, self.repo2.svfs,
214 self.unfiltered()._clrev) 213 self.unfiltered()._clrev)
215 214
216 def url(self): 215 def url(self):
217 return self._url 216 return self._url