--- a/mercurial/revlog.py Sun Apr 02 18:25:12 2017 -0700
+++ b/mercurial/revlog.py Sun Apr 02 18:29:24 2017 -0700
@@ -1288,22 +1288,23 @@
# look up what we need to read
rawtext = None
- if rev is None:
- rev = self.rev(node)
+ if rawtext is None:
+ if rev is None:
+ rev = self.rev(node)
- chain, stopped = self._deltachain(rev, stoprev=cachedrev)
- if stopped:
- rawtext = self._cache[2]
+ chain, stopped = self._deltachain(rev, stoprev=cachedrev)
+ if stopped:
+ rawtext = self._cache[2]
- # drop cache to save memory
- self._cache = None
+ # drop cache to save memory
+ self._cache = None
- bins = self._chunks(chain, df=_df)
- if rawtext is None:
- rawtext = bytes(bins[0])
- bins = bins[1:]
+ bins = self._chunks(chain, df=_df)
+ if rawtext is None:
+ rawtext = bytes(bins[0])
+ bins = bins[1:]
- rawtext = mdiff.patches(rawtext, bins)
+ rawtext = mdiff.patches(rawtext, bins)
if flags is None:
flags = self.flags(rev)