Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 22911:509e2cbee679
dirstate: separate 'lookup' status field from others
The status tuple returned from dirstate.status() has an additional
field compared to the other status tuples: lookup/unsure. This field
is just an optimization and not something most callers care about
(they want the resolved value of 'modified' or 'clean'). To prepare
for a single future status type, let's separate out the 'lookup' field
from the rest by having dirstate.status() return a pair: (lookup,
status).
author | Martin von Zweigbergk <martinvonz@gmail.com> |
---|---|
date | Fri, 03 Oct 2014 21:44:10 -0700 |
parents | 5220c12c43fd |
children | c95db3208a33 |
comparison
equal
deleted
inserted
replaced
22910:4f2a5c7cdf78 | 22911:509e2cbee679 |
---|---|
1416 listignored, listclean, listunknown = ignored, clean, unknown | 1416 listignored, listclean, listunknown = ignored, clean, unknown |
1417 match = match or matchmod.always(self._repo.root, self._repo.getcwd()) | 1417 match = match or matchmod.always(self._repo.root, self._repo.getcwd()) |
1418 subrepos = [] | 1418 subrepos = [] |
1419 if '.hgsub' in self: | 1419 if '.hgsub' in self: |
1420 subrepos = sorted(self.substate) | 1420 subrepos = sorted(self.substate) |
1421 s = self._repo.dirstate.status(match, subrepos, listignored, | 1421 cmp, s = self._repo.dirstate.status(match, subrepos, listignored, |
1422 listclean, listunknown) | 1422 listclean, listunknown) |
1423 cmp, modified, added, removed, deleted, unknown, ignored, clean = s | 1423 modified, added, removed, deleted, unknown, ignored, clean = s |
1424 | 1424 |
1425 # check for any possibly clean files | 1425 # check for any possibly clean files |
1426 if cmp: | 1426 if cmp: |
1427 modified2, fixup = self._checklookup(cmp) | 1427 modified2, fixup = self._checklookup(cmp) |
1428 modified += modified2 | 1428 modified += modified2 |