Patchwork [08,of,10] rawdata: implement the method for `remotefilelog` too

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 7, 2019, 9:30 p.m.
Message ID <cfad2ef930798575f52a.1565213437@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/41211/
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 1565203912 -7200
#      Wed Aug 07 20:51:52 2019 +0200
# Node ID cfad2ef930798575f52a6a20313b0b57a5b16e1f
# Parent  614e6f874408568cda406299e714b0d711e970be
# EXP-Topic rawdata
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r cfad2ef93079
rawdata: implement the method for `remotefilelog` too

This is needed for all storage implementations.

Patch

diff --git a/hgext/remotefilelog/remotefilelog.py b/hgext/remotefilelog/remotefilelog.py
--- a/hgext/remotefilelog/remotefilelog.py
+++ b/hgext/remotefilelog/remotefilelog.py
@@ -324,6 +324,9 @@  class remotefilelog(object):
         text, verifyhash = self._processflags(rawtext, flags, 'read')
         return text
 
+    def rawdata(self, node):
+        return self.revision(node, raw=False)
+
     def _processflags(self, text, flags, operation, raw=False):
         # mostly copied from hg/mercurial/revlog.py
         validatehash = True