[PATCH 2 of 2] dirstate.status: list interesting files whenever possible

Siddharth Agarwal sid0 at fb.com
Fri May 10 01:17:43 CDT 2013


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1366751793 25200
#      Tue Apr 23 14:16:33 2013 -0700
# Node ID d162c44e829b4a889022f8752aa1e23e2e4070f2
# Parent  ed4040d92e56cd7a963f896f72bcf55922449171
dirstate.status: list interesting files whenever possible

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -810,8 +810,13 @@
 
         lnkkind = stat.S_IFLNK
 
-        for fn, st in self.walk(match, subrepos, listunknown,
-                                listignored).iteritems():
+        # We can't only list interesting files when:
+        # - we're listing all clean files
+        # - match.traversedir does something, because match.traversedir should
+        #   be called for every dir in the working dir
+        interesting = not listclean and match.traversedir is None
+        for fn, st in self.walk(match, subrepos, listunknown, listignored,
+                                interesting=interesting).iteritems():
             if fn not in dmap:
                 if (listignored or mexact(fn)) and dirignore(fn):
                     if listignored:


More information about the Mercurial-devel mailing list