mercurial/revlog.py
changeset 30011 d81fe5af92b8
parent 29997 b5e5ddf48bd2
child 30012 60a66c79125f
--- a/mercurial/revlog.py	Fri Sep 23 08:15:05 2016 +0000
+++ b/mercurial/revlog.py	Wed Aug 24 20:00:52 2016 -0700
@@ -1440,18 +1440,19 @@
                         fh = dfh
                     ptext = self.revision(self.node(rev), _df=fh)
                     delta = mdiff.textdiff(ptext, t)
-            data = self.compress(delta)
-            l = len(data[1]) + len(data[0])
+            header, data = self.compress(delta)
+            deltalen = len(header) + len(data)
             chainbase = self.chainbase(rev)
-            dist = l + offset - self.start(chainbase)
+            dist = deltalen + offset - self.start(chainbase)
             if self._generaldelta:
                 base = rev
             else:
                 base = chainbase
             chainlen, compresseddeltalen = self._chaininfo(rev)
             chainlen += 1
-            compresseddeltalen += l
-            return dist, l, data, base, chainbase, chainlen, compresseddeltalen
+            compresseddeltalen += deltalen
+            return (dist, deltalen, (header, data), base,
+                    chainbase, chainlen, compresseddeltalen)
 
         curr = len(self)
         prev = curr - 1