comparison mercurial/context.py @ 35336:777cb4497d8d

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
author Phil Cohen <phillco@fb.com>
date Thu, 07 Dec 2017 16:07:06 -0800
parents dc9da4f4f363
children 8384553b1684
comparison
equal deleted inserted replaced
35335:dc9da4f4f363 35336:777cb4497d8d
1997 self.clean() 1997 self.clean()
1998 1998
1999 def setbase(self, wrappedctx): 1999 def setbase(self, wrappedctx):
2000 self._wrappedctx = wrappedctx 2000 self._wrappedctx = wrappedctx
2001 self._parents = [wrappedctx] 2001 self._parents = [wrappedctx]
2002 # Drop old manifest cache as it is now out of date.
2003 # This is necessary when, e.g., rebasing several nodes with one
2004 # ``overlayworkingctx`` (e.g. with --collapse).
2005 util.clearcachedproperty(self, '_manifest')
2002 2006
2003 def data(self, path): 2007 def data(self, path):
2004 if self.isdirty(path): 2008 if self.isdirty(path):
2005 if self._cache[path]['exists']: 2009 if self._cache[path]['exists']:
2006 if self._cache[path]['data']: 2010 if self._cache[path]['data']: