changeset 11098:380ab78dbd69

workingctx: add explicit status method, add ignored and fix clean workingctx.clean() and memctx.clean() have both been returning ignored files since their creation. This patch fixes clean() while introducing a method for querying ignored files. The new status() method can be used to explicitly override the default (fast) arguments used by the _status property.
author Steve Borho <steve@borho.org>
date Tue, 04 May 2010 14:52:25 -0500
parents 9651fa5a3cbf
children a68bd3b7c040
files mercurial/context.py
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Tue May 04 20:12:58 2010 -0500
+++ b/mercurial/context.py	Tue May 04 14:52:25 2010 -0500
@@ -642,6 +642,15 @@
         self._parents = [changectx(self._repo, x) for x in p]
         return self._parents
 
+    def status(self, ignored=False, clean=False, unknown=False):
+        """Explicit status query
+        Unless this method is used to query the working copy status, the
+        _status property will implicitly read the status using its default
+        arguments."""
+        self._status = self._repo.status(ignored=ignored, clean=clean,
+                                         unknown=unknown)
+        return self._status
+
     def manifest(self):
         return self._manifest
     def user(self):
@@ -663,8 +672,10 @@
         return self._status[3]
     def unknown(self):
         return self._status[4]
+    def ignored(self):
+        return self._status[5]
     def clean(self):
-        return self._status[5]
+        return self._status[6]
     def branch(self):
         return self._extra['branch']
     def extra(self):
@@ -878,8 +889,10 @@
         return self._status[3]
     def unknown(self):
         return self._status[4]
+    def ignored(self):
+        return self._status[5]
     def clean(self):
-        return self._status[5]
+        return self._status[6]
     def branch(self):
         return self._extra['branch']
     def extra(self):