Patchwork D1244: overlayworkingctx: invalidate the manifest cache when changing parents

login
register
mail settings
Submitter phabricator
Date Dec. 8, 2017, 8 p.m.
Message ID <2b485d8547eaaead768cb9152cb4a03f@localhost.localdomain>
Download mbox | patch
Permalink /patch/26111/
State Not Applicable
Headers show

Comments

phabricator - Dec. 8, 2017, 8 p.m.
phillco updated this revision to Diff 4258.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1244?vs=4236&id=4258

REVISION DETAIL
  https://phab.mercurial-scm.org/D1244

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




To: phillco, #hg-reviewers, durin42, dlax
Cc: dlax, mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1999,6 +1999,10 @@ 
     def setbase(self, wrappedctx):
         self._wrappedctx = wrappedctx
         self._parents = [wrappedctx]
+        # Drop old manifest cache as it is now out of date.
+        # This is necessary when, e.g., rebasing several nodes with one
+        # ``overlayworkingctx`` (e.g. with --collapse).
+        util.clearcachedproperty(self, '_manifest')
 
     def data(self, path):
         if self.isdirty(path):