##// END OF EJS Templates
revlog: avoid applying delta chain on cache hit...
Jun Wu -
r31804:726f2412 default
parent child Browse files
Show More
@@ -1268,6 +1268,7 b' class revlog(object):'
1268 1268
1269 1269 cachedrev = None
1270 1270 flags = None
1271 rawtext = None
1271 1272 if node == nullid:
1272 1273 return ""
1273 1274 if self._cache:
@@ -1283,11 +1284,12 b' class revlog(object):'
1283 1284 # no extra flags set, no flag processor runs, text = rawtext
1284 1285 if flags == REVIDX_DEFAULT_FLAGS:
1285 1286 return self._cache[2]
1287 # rawtext is reusable. need to run flag processor
1288 rawtext = self._cache[2]
1286 1289
1287 1290 cachedrev = self._cache[1]
1288 1291
1289 1292 # look up what we need to read
1290 rawtext = None
1291 1293 if rawtext is None:
1292 1294 if rev is None:
1293 1295 rev = self.rev(node)
@@ -1305,15 +1307,17 b' class revlog(object):'
1305 1307 bins = bins[1:]
1306 1308
1307 1309 rawtext = mdiff.patches(rawtext, bins)
1310 self._cache = (node, rev, rawtext)
1308 1311
1309 1312 if flags is None:
1313 if rev is None:
1314 rev = self.rev(node)
1310 1315 flags = self.flags(rev)
1311 1316
1312 1317 text, validatehash = self._processflags(rawtext, flags, 'read', raw=raw)
1313 1318 if validatehash:
1314 1319 self.checkhash(text, node, rev=rev)
1315 1320
1316 self._cache = (node, rev, rawtext)
1317 1321 return text
1318 1322
1319 1323 def hash(self, text, p1, p2):
General Comments 0
You need to be logged in to leave comments. Login now