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