mercurial/bookmarks.py
changeset 32734 b5613bda454e
parent 32381 b9942bc6b292
child 32735 d7522f983f37
--- a/mercurial/bookmarks.py	Wed Jun 07 18:22:11 2017 +0100
+++ b/mercurial/bookmarks.py	Wed Jun 07 19:21:02 2017 +0100
@@ -50,6 +50,7 @@
     def __init__(self, repo):
         dict.__init__(self)
         self._repo = repo
+        lookup = repo.changelog.lookup
         try:
             bkfile = _getbkfile(repo)
             for line in bkfile:
@@ -63,7 +64,7 @@
                 sha, refspec = line.split(' ', 1)
                 refspec = encoding.tolocal(refspec)
                 try:
-                    self[refspec] = repo.changelog.lookup(sha)
+                    self[refspec] = lookup(sha)
                 except LookupError:
                     pass
         except IOError as inst: