changeset 31754:5b93c6fdb391

revlog: use raw revisions in clone test-revlog-raw.py now shows "clone test passed", but there is more to fix.
author Jun Wu <quark@fb.com>
date Thu, 30 Mar 2017 18:24:23 -0700
parents 5d11b5edcb0b
children ec48d57de110
files mercurial/revlog.py tests/test-revlog-raw.py.out
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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