comparison mercurial/revlog.py @ 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
comparison
equal deleted inserted replaced
31751:2133437dad17 31752:f424fb180fea
1633 else: 1633 else:
1634 if self._inline: 1634 if self._inline:
1635 fh = ifh 1635 fh = ifh
1636 else: 1636 else:
1637 fh = dfh 1637 fh = dfh
1638 ptext = self.revision(rev, _df=fh) 1638 ptext = self.revision(rev, _df=fh, raw=True)
1639 delta = mdiff.textdiff(ptext, t) 1639 delta = mdiff.textdiff(ptext, t)
1640 header, data = self.compress(delta) 1640 header, data = self.compress(delta)
1641 deltalen = len(header) + len(data) 1641 deltalen = len(header) + len(data)
1642 chainbase = self.chainbase(rev) 1642 chainbase = self.chainbase(rev)
1643 dist = deltalen + offset - self.start(chainbase) 1643 dist = deltalen + offset - self.start(chainbase)