scmutil.addremove: stop sorting all walk results
The only place where the order matters is in printing out added or removed
files. We already sort that set.
On a large repository with 170,000 files, this speeds up perfaddremove from
2.34 seconds to 2.13.
--- a/mercurial/scmutil.py Tue Apr 02 10:56:24 2013 -0700
+++ b/mercurial/scmutil.py Tue Apr 02 14:50:31 2013 -0700
@@ -678,7 +678,7 @@
ctx = repo[None]
dirstate = repo.dirstate
walkresults = dirstate.walk(m, sorted(ctx.substate), True, False)
- for abs in sorted(walkresults):
+ for abs in walkresults:
st = walkresults[abs]
dstate = dirstate[abs]
if dstate == '?' and audit_path.check(abs):