changeset 31752:f424fb180fea

revlog: use raw content when building delta Using external content provided by flagprocessor when building revlog delta is wrong, because deltas are applied to raw contents in revlog. This patch fixes the above issue by adding "raw=True". test-revlog-raw.py now shows "local test passed", but there is more to fix.
author Jun Wu <quark@fb.com>
date Thu, 30 Mar 2017 17:58:03 -0700
parents 2133437dad17
children 5d11b5edcb0b
files mercurial/revlog.py tests/test-revlog-raw.py.out
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Thu Mar 30 15:34:08 2017 -0700
+++ b/mercurial/revlog.py	Thu Mar 30 17:58:03 2017 -0700
@@ -1635,7 +1635,7 @@
                         fh = ifh
                     else:
                         fh = dfh
-                    ptext = self.revision(rev, _df=fh)
+                    ptext = self.revision(rev, _df=fh, raw=True)
                     delta = mdiff.textdiff(ptext, t)
             header, data = self.compress(delta)
             deltalen = len(header) + len(data)
--- a/tests/test-revlog-raw.py.out	Thu Mar 30 15:34:08 2017 -0700
+++ b/tests/test-revlog-raw.py.out	Thu Mar 30 17:58:03 2017 -0700
@@ -1,1 +1,2 @@
-abort: crashed: integrity check failed on _testrevlog.i:11
+local test passed
+abort: crashed: invalid patch