changeset 42777:740450677221

rawdata: update callers in test-revlog-raw We update callers incrementally because this help bisecting failures. This was useful during development, so we expect it might be useful again in the future.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 07 Aug 2019 22:41:49 +0200
parents 5769ed8fa5f4
children 22e74b5aa59d
files tests/test-revlog-raw.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-revlog-raw.py	Wed Aug 07 20:10:43 2019 +0200
+++ b/tests/test-revlog-raw.py	Wed Aug 07 22:41:49 2019 +0200
@@ -162,7 +162,7 @@
         p1 = rlog.node(r - 1)
         p2 = node.nullid
         if r == 0 or (rlog.flags(r) & revlog.REVIDX_EXTSTORED):
-            text = rlog.revision(r, raw=True)
+            text = rlog.rawdata(r)
             cachedelta = None
         else:
             # deltaparent cannot have EXTSTORED flag.
@@ -269,7 +269,7 @@
             abort('rev %d: wrong rawsize' % rev)
         if rlog.revision(rev, raw=False) != text:
             abort('rev %d: wrong text' % rev)
-        if rlog.revision(rev, raw=True) != rawtext:
+        if rlog.rawdata(rev) != rawtext:
             abort('rev %d: wrong rawtext' % rev)
         result.append((text, rawtext))
 
@@ -294,7 +294,10 @@
                 nlog = newrevlog()
                 for rev in revorder:
                     for raw in raworder:
-                        t = nlog.revision(rev, raw=raw)
+                        if raw:
+                            t = nlog.rawdata(rev)
+                        else:
+                            t = nlog.revision(rev)
                         if t != expected[rev][int(raw)]:
                             abort('rev %d: corrupted %stext'
                                   % (rev, raw and 'raw' or ''))