comparison mercurial/context.py @ 31270:aac054e5389b

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.
author Durham Goode <durham@fb.com>
date Tue, 07 Mar 2017 17:49:50 -0800
parents 6a9d0d24fdb4
children bd884ef2ee46
comparison
equal deleted inserted replaced
31269:6a9d0d24fdb4 31270:aac054e5389b
115 # if you have revisions 1000 and 1001, 1001 is probably stored as a 115 # if you have revisions 1000 and 1001, 1001 is probably stored as a
116 # delta against 1000. Thus, if you read 1000 first, we'll reconstruct 116 # delta against 1000. Thus, if you read 1000 first, we'll reconstruct
117 # 1000 and cache it so that when you read 1001, we just need to apply a 117 # 1000 and cache it so that when you read 1001, we just need to apply a
118 # delta to what's in the cache. So that's one full reconstruction + one 118 # delta to what's in the cache. So that's one full reconstruction + one
119 # delta application. 119 # delta application.
120 mf2 = None
120 if self.rev() is not None and self.rev() < other.rev(): 121 if self.rev() is not None and self.rev() < other.rev():
121 self.manifest() 122 mf2 = self._manifestmatches(match, s)
122 mf1 = other._manifestmatches(match, s) 123 mf1 = other._manifestmatches(match, s)
123 mf2 = self._manifestmatches(match, s) 124 if mf2 is None:
125 mf2 = self._manifestmatches(match, s)
124 126
125 modified, added = [], [] 127 modified, added = [], []
126 removed = [] 128 removed = []
127 clean = [] 129 clean = []
128 deleted, unknown, ignored = s.deleted, s.unknown, s.ignored 130 deleted, unknown, ignored = s.deleted, s.unknown, s.ignored