scmutil.addremove: use iteritems on walk results
Now that we no longer sort all the walk results, using iteritems becomes
possible.
This is a relatively minor speedup: on a large repository with 170,000 files,
perfaddremove goes from 2.13 seconds to 2.10.
--- a/mercurial/scmutil.py Tue Apr 02 14:50:31 2013 -0700
+++ b/mercurial/scmutil.py Tue Apr 02 14:50:50 2013 -0700
@@ -678,8 +678,7 @@
ctx = repo[None]
dirstate = repo.dirstate
walkresults = dirstate.walk(m, sorted(ctx.substate), True, False)
- for abs in walkresults:
- st = walkresults[abs]
+ for abs, st in walkresults.iteritems():
dstate = dirstate[abs]
if dstate == '?' and audit_path.check(abs):
unknown.append(abs)