localrepo: improve dirstate.normal lookup by cacheing the function
authorSean Farley <sean.michael.farley@gmail.com>
Tue, 11 Mar 2014 17:44:09 -0500
changeset 21394 20a30cd41d21
parent 21393 a45af4da0421
child 21395 f251b92d9ed9
localrepo: improve dirstate.normal lookup by cacheing the function
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Fri Mar 07 13:32:37 2014 -0800
+++ b/mercurial/localrepo.py	Tue Mar 11 17:44:09 2014 -0500
@@ -1567,10 +1567,11 @@
                     try:
                         # updating the dirstate is optional
                         # so we don't wait on the lock
+                        normal = self.dirstate.normal
                         wlock = self.wlock(False)
                         try:
                             for f in fixup:
-                                self.dirstate.normal(f)
+                                normal(f)
                         finally:
                             wlock.release()
                     except error.LockError: