Patchwork [03,of,15] rawdata: update callers in bundlerepo

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 15, 2019, 10:40 a.m.
Message ID <bd9d982bf37ab1f03250.1565865601@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/41287/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 15, 2019, 10:40 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1565201350 -7200
#      Wed Aug 07 20:09:10 2019 +0200
# Node ID bd9d982bf37ab1f03250c468673e6b863524370c
# Parent  521bb18efd231f6d6b45666a9828e6e8fae0a650
# EXP-Topic rawdata
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r bd9d982bf37a
rawdata: update callers in bundlerepo

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.

Patch

diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -105,8 +105,8 @@  class bundlerevlog(revlog.revlog):
         elif rev1 <= self.repotiprev and rev2 <= self.repotiprev:
             return revlog.revlog.revdiff(self, rev1, rev2)
 
-        return mdiff.textdiff(self.revision(rev1, raw=True),
-                              self.revision(rev2, raw=True))
+        return mdiff.textdiff(self.rawdata(rev1),
+                              self.rawdata(rev2))
 
     def revision(self, nodeorrev, _df=None, raw=False):
         """return an uncompressed revision of a given node or revision
@@ -153,7 +153,7 @@  class bundlerevlog(revlog.revlog):
         # Revlog subclasses may override 'revision' method to modify format of
         # content retrieved from revlog. To use bundlerevlog with such class one
         # needs to override 'baserevision' and make more specific call here.
-        return revlog.revlog.revision(self, nodeorrev, raw=True)
+        return revlog.revlog.rawdata(self, nodeorrev)
 
     def addrevision(self, *args, **kwargs):
         raise NotImplementedError
@@ -184,7 +184,7 @@  class bundlechangelog(bundlerevlog, chan
         oldfilter = self.filteredrevs
         try:
             self.filteredrevs = ()
-            return changelog.changelog.revision(self, nodeorrev, raw=True)
+            return changelog.changelog.rawdata(self, nodeorrev)
         finally:
             self.filteredrevs = oldfilter
 
@@ -209,7 +209,7 @@  class bundlemanifest(bundlerevlog, manif
         if node in self.fulltextcache:
             result = '%s' % self.fulltextcache[node]
         else:
-            result = manifest.manifestrevlog.revision(self, nodeorrev, raw=True)
+            result = manifest.manifestrevlog.rawdata(self, nodeorrev)
         return result
 
     def dirlog(self, d):
@@ -227,7 +227,7 @@  class bundlefilelog(filelog.filelog):
                                     cgunpacker, linkmapper)
 
     def baserevision(self, nodeorrev):
-        return filelog.filelog.revision(self, nodeorrev, raw=True)
+        return filelog.filelog.rawdata(self, nodeorrev)
 
 class bundlepeer(localrepo.localpeer):
     def canpush(self):