changeset 32519:6ae068f801e3

context: do not cache manifestctx This will make sure when ctx.repo.manifestlog changes, a correct new manifestctx is returned. repo.manifestlog takes care of caching so the manifestctx won't be reconstructed every time.
author Jun Wu <quark@fb.com>
date Thu, 25 May 2017 17:20:43 -0700
parents bb628fc85b0e
children dc0da9829c29
files mercurial/context.py tests/test-context.py.out
diffstat 2 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Thu May 25 17:06:32 2017 -0700
+++ b/mercurial/context.py	Thu May 25 17:20:43 2017 -0700
@@ -551,7 +551,7 @@
     def _manifest(self):
         return self._manifestctx.read()
 
-    @propertycache
+    @property
     def _manifestctx(self):
         return self._repo.manifestlog[self._changeset.manifest]
 
@@ -2314,7 +2314,7 @@
     def manifestnode(self):
         return self._manifestnode
 
-    @propertycache
+    @property
     def _manifestctx(self):
         return self._repo.manifestlog[self._manifestnode]
 
--- a/tests/test-context.py.out	Thu May 25 17:06:32 2017 -0700
+++ b/tests/test-context.py.out	Thu May 25 17:20:43 2017 -0700
@@ -47,6 +47,4 @@
 == commit with manifestlog invalidated
 commit 1: 2efe531a913fa648867ab8824360371679d05a65
 commit 2: 2caca91f6362020334384ebe27bae67315298abf
-cannot read data: LookupError('Q\xa3L\xa5Ou\x8f\xce8\xda<Q\x7f\x9f(\xc9;Li/', '00manifest.i', 'no node')
 commit 3: abd6b0f49f338be22b094ef2b7425e8048f8337b
-cannot read data: LookupError("\x82\x15\xb8\xd3\x85\xf6H'\x9cP'D\x97\x1e\xab\x98O\xbb\x05\x9d", '00manifest.i', 'no node')