# HG changeset patch # User Martin von Zweigbergk # Date 1412961275 25200 # Node ID 4d680deb0d9e8ee2d8f859c65cd5c78f2e851eaf # Parent c95db3208a33f5146722a79da92a21ccac4696f1 status: update and move documentation of status types to status class The various status types are currently documented on the dirstate.status() method. Now that we have a class for the status types, it makese sense to document the status types there instead. Only leave the bits related to lookup/unsure in the status() method documentation. diff -r c95db3208a33 -r 4d680deb0d9e mercurial/dirstate.py --- a/mercurial/dirstate.py Tue Oct 14 00:52:27 2014 -0500 +++ b/mercurial/dirstate.py Fri Oct 10 10:14:35 2014 -0700 @@ -809,28 +809,17 @@ def status(self, match, subrepos, ignored, clean, unknown): '''Determine the status of the working copy relative to the - dirstate and return a nested tuple of lists (unsure, (modified, added, - removed, deleted, unknown, ignored, clean)), where: + dirstate and return a pair of (unsure, status), where status is of type + scmutil.status and: unsure: files that might have been modified since the dirstate was written, but need to be read to be sure (size is the same but mtime differs) - modified: + status.modified: files that have definitely been modified since the dirstate was written (different size or mode) - added: - files that have been explicitly added with hg add - removed: - files that have been explicitly removed with hg remove - deleted: - files that have been deleted through other means ("missing") - unknown: - files not in the dirstate that are not ignored - ignored: - files not in the dirstate that are ignored - (by _dirignore()) - clean: + status.clean: files that have definitely not been modified since the dirstate was written ''' diff -r c95db3208a33 -r 4d680deb0d9e mercurial/scmutil.py --- a/mercurial/scmutil.py Tue Oct 14 00:52:27 2014 -0500 +++ b/mercurial/scmutil.py Fri Oct 10 10:14:35 2014 -0700 @@ -34,30 +34,39 @@ @property def modified(self): + '''files that have been modified''' return self[0] @property def added(self): + '''files that have been added''' return self[1] @property def removed(self): + '''files that have been removed''' return self[2] @property def deleted(self): + '''files that are in the dirstate, but have been deleted from the + working copy (aka "missing") + ''' return self[3] @property def unknown(self): + '''files not in the dirstate that are not ignored''' return self[4] @property def ignored(self): + '''files not in the dirstate that are ignored (by _dirignore())''' return self[5] @property def clean(self): + '''files that have not been modified''' return self[6] def __repr__(self, *args, **kwargs):