rawdata: update callers in storageutils
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 07 Aug 2019 20:11:50 +0200
changeset 42781 aeb2be20b33b
parent 42780 7a89b044eea4
child 42782 1d9031b6cb7e
rawdata: update callers in storageutils 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.
mercurial/utils/storageutil.py
--- a/mercurial/utils/storageutil.py	Wed Aug 07 20:11:35 2019 +0200
+++ b/mercurial/utils/storageutil.py	Wed Aug 07 20:11:50 2019 +0200
@@ -304,9 +304,9 @@
 
     ``rawsizefn`` (optional)
        Callable receiving a revision number and returning the length of the
-       ``store.revision(rev, raw=True)``.
+       ``store.rawdata(rev)``.
 
-       If not defined, ``len(store.revision(rev, raw=True))`` will be called.
+       If not defined, ``len(store.rawdata(rev))`` will be called.
 
     ``revdifffn`` (optional)
        Callable receiving a pair of revision numbers that returns a delta
@@ -422,7 +422,7 @@
         if revisiondata:
             if store.iscensored(baserev) or store.iscensored(rev):
                 try:
-                    revision = store.revision(node, raw=True)
+                    revision = store.rawdata(node)
                 except error.CensoredNodeError as e:
                     revision = e.tombstone
 
@@ -430,19 +430,18 @@
                     if rawsizefn:
                         baserevisionsize = rawsizefn(baserev)
                     else:
-                        baserevisionsize = len(store.revision(baserev,
-                                                              raw=True))
+                        baserevisionsize = len(store.rawdata(baserev))
 
             elif (baserev == nullrev
                     and deltamode != repository.CG_DELTAMODE_PREV):
-                revision = store.revision(node, raw=True)
+                revision = store.rawdata(node)
                 available.add(rev)
             else:
                 if revdifffn:
                     delta = revdifffn(baserev, rev)
                 else:
-                    delta = mdiff.textdiff(store.revision(baserev, raw=True),
-                                           store.revision(rev, raw=True))
+                    delta = mdiff.textdiff(store.rawdata(baserev),
+                                           store.rawdata(rev))
 
                 available.add(rev)