##// END OF EJS Templates
manifest: make manifestlog a storecache...
Durham Goode -
r30219:3c8811ef stable
parent child Browse files
Show More
@@ -407,7 +407,7 b' def perftags(ui, repo, **opts):'
407 repocleartagscache = repocleartagscachefunc(repo)
407 repocleartagscache = repocleartagscachefunc(repo)
408 def t():
408 def t():
409 repo.changelog = mercurial.changelog.changelog(svfs)
409 repo.changelog = mercurial.changelog.changelog(svfs)
410 repo.manifest = mercurial.manifest.manifest(svfs)
410 repo.manifestlog = mercurial.manifest.manifestlog(svfs, repo)
411 repocleartagscache()
411 repocleartagscache()
412 return len(repo.tags())
412 return len(repo.tags())
413 timer(t)
413 timer(t)
@@ -504,9 +504,9 b' class localrepository(object):'
504 c.readpending('00changelog.i.a')
504 c.readpending('00changelog.i.a')
505 return c
505 return c
506
506
507 @storecache('00manifest.i')
507 @property
508 def manifest(self):
508 def manifest(self):
509 return self._constructmanifest()
509 return self.manifestlog._oldmanifest
510
510
511 def _constructmanifest(self):
511 def _constructmanifest(self):
512 # This is a temporary function while we migrate from manifest to
512 # This is a temporary function while we migrate from manifest to
@@ -514,7 +514,7 b' class localrepository(object):'
514 # manifest creation.
514 # manifest creation.
515 return manifest.manifest(self.svfs)
515 return manifest.manifest(self.svfs)
516
516
517 @property
517 @storecache('00manifest.i')
518 def manifestlog(self):
518 def manifestlog(self):
519 return manifest.manifestlog(self.svfs, self)
519 return manifest.manifestlog(self.svfs, self)
520
520
@@ -1254,13 +1254,12 b' class manifestlog(object):'
1254 usetreemanifest = opts.get('treemanifest', usetreemanifest)
1254 usetreemanifest = opts.get('treemanifest', usetreemanifest)
1255 self._treeinmem = usetreemanifest
1255 self._treeinmem = usetreemanifest
1256
1256
1257 self._oldmanifest = repo._constructmanifest()
1258 self._revlog = self._oldmanifest
1259
1257 # We'll separate this into it's own cache once oldmanifest is no longer
1260 # We'll separate this into it's own cache once oldmanifest is no longer
1258 # used
1261 # used
1259 self._mancache = repo.manifest._mancache
1262 self._mancache = self._oldmanifest._mancache
1260
1261 @property
1262 def _revlog(self):
1263 return self._repo.manifest
1264
1263
1265 def __getitem__(self, node):
1264 def __getitem__(self, node):
1266 """Retrieves the manifest instance for the given node. Throws a KeyError
1265 """Retrieves the manifest instance for the given node. Throws a KeyError
@@ -155,7 +155,7 b' class statichttprepository(localrepo.loc'
155 self._filecache = {}
155 self._filecache = {}
156 self.requirements = requirements
156 self.requirements = requirements
157
157
158 self.manifest = manifest.manifest(self.svfs)
158 self.manifestlog = manifest.manifestlog(self.svfs, self)
159 self.changelog = changelog.changelog(self.svfs)
159 self.changelog = changelog.changelog(self.svfs)
160 self._tags = None
160 self._tags = None
161 self.nodetagscache = None
161 self.nodetagscache = None
General Comments 0
You need to be logged in to leave comments. Login now