overlayworkingctx: invalidate the manifest cache when changing parents
This fixes problems noticeable when rebasing several commits into one
destination commit using ``--collapse``. The manifest cache needs to be cleared
each time.
Differential Revision: https://phab.mercurial-scm.org/D1244
--- a/mercurial/context.py Thu Dec 07 16:07:06 2017 -0800
+++ b/mercurial/context.py Thu Dec 07 16:07:06 2017 -0800
@@ -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):