revert: don't let repo.status walk the whole working dir
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Thu, 14 Feb 2008 18:08:16 -0200
changeset 6106 cb2f7652ad1b
parent 6105 6480af8fd53c
child 6107 41bb88cb913e
revert: don't let repo.status walk the whole working dir Problem diagnosed by pmezard.
mercurial/commands.py
--- a/mercurial/commands.py	Thu Feb 14 18:08:16 2008 -0200
+++ b/mercurial/commands.py	Thu Feb 14 18:08:16 2008 -0200
@@ -2211,9 +2211,12 @@
     wlock = repo.wlock()
     try:
         # walk dirstate.
+        files = []
         for src, abs, rel, exact in cmdutil.walk(repo, pats, opts,
                                                  badmatch=mf.has_key):
             names[abs] = (rel, exact)
+            if src != 'b':
+                files.append(abs)
 
         # walk target manifest.
 
@@ -2232,7 +2235,7 @@
                 continue
             names[abs] = (rel, exact)
 
-        changes = repo.status(match=names.has_key)[:4]
+        changes = repo.status(files=files, match=names.has_key)[:4]
         modified, added, removed, deleted = map(dict.fromkeys, changes)
 
         # if f is a rename, also revert the source