# HG changeset patch
# User Pierre-Yves David <pierre-yves.da...@octobus.net>
# Date 1565210509 -7200
#      Wed Aug 07 22:41:49 2019 +0200
# Node ID 36d14c6047e70afc3a8445692084857a06a57370
# Parent  706b2c50740d509c24aac72db2c3b66e0d0880a8
# EXP-Topic rawdata
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
36d14c6047e7
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.

diff --git a/tests/test-revlog-raw.py b/tests/test-revlog-raw.py
--- a/tests/test-revlog-raw.py
+++ b/tests/test-revlog-raw.py
@@ -161,7 +161,7 @@ def lowlevelcopy(rlog, tr, destname=b'_d
         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.
@@ -268,7 +268,7 @@ def writecases(rlog, tr):
             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))
 
@@ -293,7 +293,10 @@ def checkrevlog(rlog, expected):
                 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 ''))
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to