##// END OF EJS Templates
revlog: hold a private reference to self._cache...
Matt Mackall -
r21750:4ab287c2 stable
parent child Browse files
Show More
@@ -972,13 +972,14 b' class revlog(object):'
972 972 node = nodeorrev
973 973 rev = None
974 974
975 _cache = self._cache # grab local copy of cache to avoid thread race
975 976 cachedrev = None
976 977 if node == nullid:
977 978 return ""
978 if self._cache:
979 if self._cache[0] == node:
980 return self._cache[2]
981 cachedrev = self._cache[1]
979 if _cache:
980 if _cache[0] == node:
981 return _cache[2]
982 cachedrev = _cache[1]
982 983
983 984 # look up what we need to read
984 985 text = None
@@ -1006,7 +1007,7 b' class revlog(object):'
1006 1007
1007 1008 if iterrev == cachedrev:
1008 1009 # cache hit
1009 text = self._cache[2]
1010 text = _cache[2]
1010 1011 else:
1011 1012 chain.append(iterrev)
1012 1013 chain.reverse()
General Comments 0
You need to be logged in to leave comments. Login now