revlog: use raw revisions in clone
test-revlog-raw.py now shows "clone test passed", but there is more to fix.
--- a/mercurial/revlog.py Thu Mar 30 18:23:27 2017 -0700
+++ b/mercurial/revlog.py Thu Mar 30 18:24:23 2017 -0700
@@ -2084,14 +2084,14 @@
# (Possibly) reuse the delta from the revlog if allowed and
# the revlog chunk is a delta.
cachedelta = None
- text = None
+ rawtext = None
if populatecachedelta:
dp = self.deltaparent(rev)
if dp != nullrev:
cachedelta = (dp, str(self._chunk(rev)))
if not cachedelta:
- text = self.revision(rev)
+ rawtext = self.revision(rev, raw=True)
ifh = destrevlog.opener(destrevlog.indexfile, 'a+',
checkambig=False)
@@ -2099,7 +2099,7 @@
if not destrevlog._inline:
dfh = destrevlog.opener(destrevlog.datafile, 'a+')
try:
- destrevlog._addrevision(node, text, tr, linkrev, p1, p2,
+ destrevlog._addrevision(node, rawtext, tr, linkrev, p1, p2,
flags, cachedelta, ifh, dfh)
finally:
if dfh:
--- a/tests/test-revlog-raw.py.out Thu Mar 30 18:23:27 2017 -0700
+++ b/tests/test-revlog-raw.py.out Thu Mar 30 18:24:23 2017 -0700
@@ -1,3 +1,4 @@
local test passed
addgroupcopy test passed
-abort: crashed: invalid patch
+clone test passed
+abort: crashed: integrity check failed on _destrevlog.i:5