920 |
920 |
921 In this situation, 'manifest' refers to the abstract concept of a snapshot |
921 In this situation, 'manifest' refers to the abstract concept of a snapshot |
922 of the list of files in the given commit. Consumers of the output of this |
922 of the list of files in the given commit. Consumers of the output of this |
923 class do not care about the implementation details of the actual manifests |
923 class do not care about the implementation details of the actual manifests |
924 they receive (i.e. tree or flat or lazily loaded, etc).""" |
924 they receive (i.e. tree or flat or lazily loaded, etc).""" |
925 def __init__(self, opener, oldmanifest): |
925 def __init__(self, opener, repo): |
926 self._revlog = oldmanifest |
926 self._repo = repo |
927 |
927 |
928 # We'll separate this into it's own cache once oldmanifest is no longer |
928 # We'll separate this into it's own cache once oldmanifest is no longer |
929 # used |
929 # used |
930 self._mancache = oldmanifest._mancache |
930 self._mancache = repo.manifest._mancache |
931 |
931 |
|
932 @property |
|
933 def _revlog(self): |
|
934 return self._repo.manifest |
|
935 |
|
936 @property |
|
937 def _oldmanifest(self): |
932 # _revlog is the same as _oldmanifest right now, but we eventually want |
938 # _revlog is the same as _oldmanifest right now, but we eventually want |
933 # to delete _oldmanifest while still allowing manifestlog to access the |
939 # to delete _oldmanifest while still allowing manifestlog to access the |
934 # revlog specific apis. |
940 # revlog specific apis. |
935 self._oldmanifest = oldmanifest |
941 return self._repo.manifest |
936 |
942 |
937 def __getitem__(self, node): |
943 def __getitem__(self, node): |
938 """Retrieves the manifest instance for the given node. Throws a KeyError |
944 """Retrieves the manifest instance for the given node. Throws a KeyError |
939 if not found. |
945 if not found. |
940 """ |
946 """ |