revlog: indent block to make review easier
authorJun Wu <quark@fb.com>
Sun, 02 Apr 2017 18:29:24 -0700
changeset 31803 2be73f9720a8
parent 31802 ac9a5e89113a
child 31804 726f24123f02
revlog: indent block to make review easier
mercurial/revlog.py
--- 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)