Patchwork [04,of,10] rawdata: add the method to bundlerevlog

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 7, 2019, 9:30 p.m.
Message ID <b358cc7a35d219848f13.1565213433@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/41203/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 7, 2019, 9:30 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1565208057 -7200
#      Wed Aug 07 22:00:57 2019 +0200
# Node ID b358cc7a35d219848f1366c29610eb46beb91225
# Parent  948b50c3f67ae6a7812823ead71760ef88647f7e
# EXP-Topic rawdata
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r b358cc7a35d2
rawdata: add the method to bundlerevlog

The bundlerepo logic has its own `revision` method on its own `revlog` object.
We need to "implement" `rawdata` there too.

Patch

diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -146,6 +146,9 @@  class bundlerevlog(revlog.revlog):
         self._revisioncache = (node, rev, rawtext)
         return text
 
+    def rawdata(self, nodeorrev, _df=None):
+        return self.revision(nodeorrev, _df=_df, raw=True)
+
     def baserevision(self, nodeorrev):
         # Revlog subclasses may override 'revision' method to modify format of
         # content retrieved from revlog. To use bundlerevlog with such class one