comparison mercurial/revlog.py @ 31803:2be73f9720a8

revlog: indent block to make review easier
author Jun Wu <quark@fb.com>
date Sun, 02 Apr 2017 18:29:24 -0700
parents ac9a5e89113a
children 726f24123f02
comparison
equal deleted inserted replaced
31802:ac9a5e89113a 31803:2be73f9720a8
1286 1286
1287 cachedrev = self._cache[1] 1287 cachedrev = self._cache[1]
1288 1288
1289 # look up what we need to read 1289 # look up what we need to read
1290 rawtext = None 1290 rawtext = None
1291 if rev is None:
1292 rev = self.rev(node)
1293
1294 chain, stopped = self._deltachain(rev, stoprev=cachedrev)
1295 if stopped:
1296 rawtext = self._cache[2]
1297
1298 # drop cache to save memory
1299 self._cache = None
1300
1301 bins = self._chunks(chain, df=_df)
1302 if rawtext is None: 1291 if rawtext is None:
1303 rawtext = bytes(bins[0]) 1292 if rev is None:
1304 bins = bins[1:] 1293 rev = self.rev(node)
1305 1294
1306 rawtext = mdiff.patches(rawtext, bins) 1295 chain, stopped = self._deltachain(rev, stoprev=cachedrev)
1296 if stopped:
1297 rawtext = self._cache[2]
1298
1299 # drop cache to save memory
1300 self._cache = None
1301
1302 bins = self._chunks(chain, df=_df)
1303 if rawtext is None:
1304 rawtext = bytes(bins[0])
1305 bins = bins[1:]
1306
1307 rawtext = mdiff.patches(rawtext, bins)
1307 1308
1308 if flags is None: 1309 if flags is None:
1309 flags = self.flags(rev) 1310 flags = self.flags(rev)
1310 1311
1311 text, validatehash = self._processflags(rawtext, flags, 'read', raw=raw) 1312 text, validatehash = self._processflags(rawtext, flags, 'read', raw=raw)