changegroupsubset: optimize function lookup in prune
authorMatt Mackall <mpm@selenic.com>
Fri, 13 Apr 2012 22:55:46 -0500
changeset 16426 b50fee9a2dad
parent 16425 70bf4dc52c91
child 16427 d54d4de56aa7
changegroupsubset: optimize function lookup in prune
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Fri Apr 13 22:55:46 2012 -0500
+++ b/mercurial/localrepo.py	Fri Apr 13 22:55:46 2012 -0500
@@ -1833,8 +1833,9 @@
 
         # filter any nodes that claim to be part of the known set
         def prune(revlog, missing):
+            rr, rl = revlog.rev, revlog.linkrev
             return [n for n in missing
-                    if revlog.linkrev(revlog.rev(n)) not in commonrevs]
+                    if rl(rr(n)) not in commonrevs]
 
         progress = self.ui.progress
         _bundling = _('bundling')