##// END OF EJS Templates
bookmarks: prefetch 'lookup' outside of the loop...
marmoute -
r32734:b5613bda default
parent child Browse files
Show More
@@ -50,6 +50,7 b' class bmstore(dict):'
50 def __init__(self, repo):
50 def __init__(self, repo):
51 dict.__init__(self)
51 dict.__init__(self)
52 self._repo = repo
52 self._repo = repo
53 lookup = repo.changelog.lookup
53 try:
54 try:
54 bkfile = _getbkfile(repo)
55 bkfile = _getbkfile(repo)
55 for line in bkfile:
56 for line in bkfile:
@@ -63,7 +64,7 b' class bmstore(dict):'
63 sha, refspec = line.split(' ', 1)
64 sha, refspec = line.split(' ', 1)
64 refspec = encoding.tolocal(refspec)
65 refspec = encoding.tolocal(refspec)
65 try:
66 try:
66 self[refspec] = repo.changelog.lookup(sha)
67 self[refspec] = lookup(sha)
67 except LookupError:
68 except LookupError:
68 pass
69 pass
69 except IOError as inst:
70 except IOError as inst:
General Comments 0
You need to be logged in to leave comments. Login now