status: avoid performance regression when no .hgsub is present stable
authorMatt Mackall <mpm@selenic.com>
Fri, 28 May 2010 14:41:11 -0500
branchstable
changeset 11227 054549ccb680
parent 11221 e655b378ce73
child 11228 5cdac5c35e68
child 11235 113536751190
status: avoid performance regression when no .hgsub is present (introduced by 24ce8f0c0a39)
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Tue May 25 18:19:40 2010 +0200
+++ b/mercurial/localrepo.py	Fri May 28 14:41:11 2010 -0500
@@ -1010,7 +1010,9 @@
             match.bad = bad
 
         if working: # we need to scan the working dir
-            subrepos = ctx1.substate.keys()
+            subrepos = []
+            if '.hgsub' in self.dirstate:
+                subrepos = ctx1.substate.keys()
             s = self.dirstate.status(match, subrepos, listignored,
                                      listclean, listunknown)
             cmp, modified, added, removed, deleted, unknown, ignored, clean = s