1579 cachesize = opts.get('manifestcachesize', cachesize) |
1579 cachesize = opts.get('manifestcachesize', cachesize) |
1580 usetreemanifest = opts.get('treemanifest', usetreemanifest) |
1580 usetreemanifest = opts.get('treemanifest', usetreemanifest) |
1581 self._mancache = util.lrucachedict(cachesize) |
1581 self._mancache = util.lrucachedict(cachesize) |
1582 self._treeinmem = usetreemanifest |
1582 self._treeinmem = usetreemanifest |
1583 super(manifest, self).__init__(opener, dir=dir, dirlogcache=dirlogcache) |
1583 super(manifest, self).__init__(opener, dir=dir, dirlogcache=dirlogcache) |
1584 |
|
1585 def _newmanifest(self, data=''): |
|
1586 if self._treeinmem: |
|
1587 return treemanifest(self._dir, data) |
|
1588 return manifestdict(data) |
|
1589 |
|
1590 def dirlog(self, dir): |
|
1591 """This overrides the base revlog implementation to allow construction |
|
1592 'manifest' types instead of manifestrevlog types. This is only needed |
|
1593 until we migrate off the 'manifest' type.""" |
|
1594 if dir: |
|
1595 assert self._treeondisk |
|
1596 if dir not in self._dirlogcache: |
|
1597 self._dirlogcache[dir] = manifest(self.opener, dir, |
|
1598 self._dirlogcache) |
|
1599 return self._dirlogcache[dir] |
|