# HG changeset patch # User Jun Wu # Date 1490921883 25200 # Node ID f424fb180fea18835e7f96feff8b6141fff5ec8e # Parent 2133437dad174cabab4c23a937d550e04b2f9424 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. diff -r 2133437dad17 -r f424fb180fea mercurial/revlog.py --- 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) diff -r 2133437dad17 -r f424fb180fea tests/test-revlog-raw.py.out --- 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