# HG changeset patch # User Durham Goode # Date 2017-03-08 01:49:50 # Node ID aac054e5389b6646ae0f7e92d97cb21884c0229c # Parent 6a9d0d24fdb408589eb40053abaa2c2e1da5b9f1 context: remove assumptions about manifest creation during _buildstatus Previously we called self.manifest() in some cases to preload the first manifest. This relied on the assumption that the later _manifestmatches() call did not duplicate any work the original self.manifest() call did. Let's remove that assumption, since it bit me during my refactors of this area and is easy to remove. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -117,10 +117,12 @@ class basectx(object): # 1000 and cache it so that when you read 1001, we just need to apply a # delta to what's in the cache. So that's one full reconstruction + one # delta application. + mf2 = None if self.rev() is not None and self.rev() < other.rev(): - self.manifest() + mf2 = self._manifestmatches(match, s) mf1 = other._manifestmatches(match, s) - mf2 = self._manifestmatches(match, s) + if mf2 is None: + mf2 = self._manifestmatches(match, s) modified, added = [], [] removed = []