Mercurial > hg-stable
changeset 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 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 13 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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)