comparison mercurial/context.py @ 21468:870ddcf24291

localrepo: factor out _manifestmatch logic for workingctx
author Sean Farley <sean.michael.farley@gmail.com>
date Tue, 15 Apr 2014 15:43:30 -0500
parents 3b1ec3d4ece6
children 90aff492dc4a
comparison
equal deleted inserted replaced
21467:6c90a18dd926 21468:870ddcf24291
1226 wlock.release() 1226 wlock.release()
1227 except error.LockError: 1227 except error.LockError:
1228 pass 1228 pass
1229 return modified, fixup 1229 return modified, fixup
1230 1230
1231 def _manifestmatches(self, match, s):
1232 """Slow path for workingctx
1233
1234 The fast path is when we compare the working directory to its parent
1235 which means this function is comparing with a non-parent; therefore we
1236 need to build a manifest and return what matches.
1237 """
1238 mf = self._repo['.']._manifestmatches(match, s)
1239 modified, added, removed = s[0:3]
1240 for f in modified + added:
1241 mf[f] = None
1242 mf.set(f, self.flags(f))
1243 for f in removed:
1244 if f in mf:
1245 del mf[f]
1246 return mf
1247
1231 def _dirstatestatus(self, match=None, ignored=False, clean=False, 1248 def _dirstatestatus(self, match=None, ignored=False, clean=False,
1232 unknown=False): 1249 unknown=False):
1233 '''Gets the status from the dirstate -- internal use only.''' 1250 '''Gets the status from the dirstate -- internal use only.'''
1234 listignored, listclean, listunknown = ignored, clean, unknown 1251 listignored, listclean, listunknown = ignored, clean, unknown
1235 match = match or matchmod.always(self._repo.root, self._repo.getcwd()) 1252 match = match or matchmod.always(self._repo.root, self._repo.getcwd())