[PATCH 2 of 2 V2] dirstate.status: limit list to interesting files when possible
Siddharth Agarwal
sid0 at fb.com
Mon May 13 14:47:32 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 4ffc32769e7d083f938104d1ae8b02c75cdb1726
# Parent ed4040d92e56cd7a963f896f72bcf55922449171
dirstate.status: limit list to interesting files when 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