[PATCH 04 of 16 V3] dirstate: update and move documentation of status types to status class
Martin von Zweigbergk
martinvonz at gmail.com
Fri Oct 10 17:20:36 CDT 2014
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at gmail.com>
# Date 1412961275 25200
# Fri Oct 10 10:14:35 2014 -0700
# Node ID 8553c665e37bc353220e7b82aed1c5b5de9a5e98
# Parent bc97ca8ffcc516f2eb051a62bbfddf50f7e7f56a
dirstate: 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()
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
@@ -41,30 +41,39 @@
+ '''files that have been modified'''
+ '''files that have been added'''
+ '''files that have been removed'''
+ '''files that are in the dirstate, but have been deleted from the
+ working copy (aka "missing")
+ '''files not in the dirstate that are not ignored'''
+ '''files not in the dirstate that are ignored (by _dirignore())'''
+ '''files that have not been modified'''
def __repr__(self, *args, **kwargs):
@@ -847,28 +856,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
+ dirstate.status and:
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)
files that have definitely been modified since the dirstate
was written (different size or mode)
- files that have been explicitly added with hg add
- files that have been explicitly removed with hg remove
- files that have been deleted through other means ("missing")
- files not in the dirstate that are not ignored
- files not in the dirstate that are ignored
- (by _dirignore())
files that have definitely not been modified since the
dirstate was written
More information about the Mercurial-devel