Show More
@@ -957,6 +957,13 class manifestlog(object): | |||||
957 | def __init__(self, opener, repo): |
|
957 | def __init__(self, opener, repo): | |
958 | self._repo = repo |
|
958 | self._repo = repo | |
959 |
|
959 | |||
|
960 | usetreemanifest = False | |||
|
961 | ||||
|
962 | opts = getattr(opener, 'options', None) | |||
|
963 | if opts is not None: | |||
|
964 | usetreemanifest = opts.get('treemanifest', usetreemanifest) | |||
|
965 | self._treeinmem = usetreemanifest | |||
|
966 | ||||
960 | # We'll separate this into it's own cache once oldmanifest is no longer |
|
967 | # We'll separate this into it's own cache once oldmanifest is no longer | |
961 | # used |
|
968 | # used | |
962 | self._mancache = repo.manifest._mancache |
|
969 | self._mancache = repo.manifest._mancache | |
@@ -965,13 +972,6 class manifestlog(object): | |||||
965 | def _revlog(self): |
|
972 | def _revlog(self): | |
966 | return self._repo.manifest |
|
973 | return self._repo.manifest | |
967 |
|
974 | |||
968 | @property |
|
|||
969 | def _oldmanifest(self): |
|
|||
970 | # _revlog is the same as _oldmanifest right now, but we eventually want |
|
|||
971 | # to delete _oldmanifest while still allowing manifestlog to access the |
|
|||
972 | # revlog specific apis. |
|
|||
973 | return self._repo.manifest |
|
|||
974 |
|
||||
975 | def __getitem__(self, node): |
|
975 | def __getitem__(self, node): | |
976 | """Retrieves the manifest instance for the given node. Throws a KeyError |
|
976 | """Retrieves the manifest instance for the given node. Throws a KeyError | |
977 | if not found. |
|
977 | if not found. | |
@@ -984,7 +984,7 class manifestlog(object): | |||||
984 | isinstance(cachemf, treemanifestctx)): |
|
984 | isinstance(cachemf, treemanifestctx)): | |
985 | return cachemf |
|
985 | return cachemf | |
986 |
|
986 | |||
987 |
if self. |
|
987 | if self._treeinmem: | |
988 | m = treemanifestctx(self._revlog, '', node) |
|
988 | m = treemanifestctx(self._revlog, '', node) | |
989 | else: |
|
989 | else: | |
990 | m = manifestctx(self._revlog, node) |
|
990 | m = manifestctx(self._revlog, node) |
General Comments 0
You need to be logged in to leave comments.
Login now