Mercurial > hg
diff mercurial/dirstate.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 | 8fe74328f700 |
children | cb4449921a1d |
line wrap: on
line diff
--- a/mercurial/dirstate.py Mon Oct 13 14:18:47 2014 -0700 +++ b/mercurial/dirstate.py Fri Oct 03 21:44:10 2014 -0700 @@ -809,8 +809,8 @@ def status(self, match, subrepos, ignored, clean, unknown): '''Determine the status of the working copy relative to the - dirstate and return a tuple of lists (unsure, modified, added, - removed, deleted, unknown, ignored, clean), where: + dirstate and return a nested tuple of lists (unsure, (modified, added, + removed, deleted, unknown, ignored, clean)), where: unsure: files that might have been modified since the dirstate was @@ -908,8 +908,8 @@ elif state == 'r': radd(fn) - return (lookup, modified, added, removed, deleted, unknown, ignored, - clean) + return (lookup, (modified, added, removed, deleted, unknown, ignored, + clean)) def matches(self, match): '''