Patchwork [7,of,8] workingctx: call _dirstatestatus in status

login
register
mail settings
Submitter Sean Farley
Date May 6, 2014, 11:33 p.m.
Message ID <a2478cd201b77a44d2f9.1399419204@laptop.local>
Download mbox | patch
Permalink /patch/4652/
State Accepted
Commit ed608a544719e19002c50e1a01b16d792eae9e19
Headers show

Comments

Sean Farley - May 6, 2014, 11:33 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1398190830 18000
#      Tue Apr 22 13:20:30 2014 -0500
# Node ID a2478cd201b77a44d2f9071d99ba3edc9b269359
# Parent  d556bbc7a4a12f0c644be280a95c649f0d113437
workingctx: call _dirstatestatus in status

Rip out the call from workingctx.status to localrepo.status.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1236,25 +1236,32 @@  class workingctx(committablectx):
             if fixup and listclean:
                 clean += fixup
 
         return [modified, added, removed, deleted, unknown, ignored, clean]
 
-    def status(self, ignored=False, clean=False, unknown=False):
+    def status(self, ignored=False, clean=False, unknown=False, match=None):
         """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."""
-        stat = self._repo.status(ignored=ignored, clean=clean, unknown=unknown)
+        listignored, listclean, listunknown = ignored, clean, unknown
+        s = self._dirstatestatus(match=match, ignored=listignored,
+                                 clean=listclean, unknown=listunknown)
+        modified, added, removed, deleted, unknown, ignored, clean = s
+
+        modified = self._filtersuspectsymlink(modified)
+
         self._unknown = self._ignored = self._clean = None
-        if unknown:
-            self._unknown = stat[4]
-        if ignored:
-            self._ignored = stat[5]
-        if clean:
-            self._clean = stat[6]
-        self._status = stat[:4]
-        return stat
+        if listunknown:
+            self._unknown = unknown
+        if listignored:
+            self._ignored = ignored
+        if listclean:
+            self._clean = clean
+        self._status = modified, added, removed, deleted
+
+        return modified, added, removed, deleted, unknown, ignored, clean
 
 
 class committablefilectx(basefilectx):
     """A committablefilectx provides common functionality for a file context
     that wants the ability to commit, e.g. workingfilectx or memfilectx."""