# HG changeset patch # User Phil Cohen # Date 2017-12-08 00:07:06 # Node ID 777cb4497d8dc0d1f45cf263a0a1513978adfa91 # Parent dc9da4f4f363e1c7835b9e3223afdf3382fec7c6 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 diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1999,6 +1999,10 @@ class overlayworkingctx(committablectx): 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):