Patchwork [04,of,15] rawdata: update caller in remotefilelog

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 15, 2019, 10:40 a.m.
Message ID <475f24d36ed010725534.1565865602@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/41286/
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 1565210112 -7200
#      Wed Aug 07 22:35:12 2019 +0200
# Node ID 475f24d36ed010725534e60e0ea0a2a0d9d914ff
# Parent  bd9d982bf37ab1f03250c468673e6b863524370c
# EXP-Topic rawdata
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 475f24d36ed0
rawdata: update caller in remotefilelog

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/hgext/remotefilelog/contentstore.py b/hgext/remotefilelog/contentstore.py
--- a/hgext/remotefilelog/contentstore.py
+++ b/hgext/remotefilelog/contentstore.py
@@ -264,7 +264,7 @@  class manifestrevlogstore(object):
         self._repackstartlinkrev = 0
 
     def get(self, name, node):
-        return self._revlog(name).revision(node, raw=True)
+        return self._revlog(name).rawdata(node)
 
     def getdelta(self, name, node):
         revision = self.get(name, node)
diff --git a/hgext/remotefilelog/fileserverclient.py b/hgext/remotefilelog/fileserverclient.py
--- a/hgext/remotefilelog/fileserverclient.py
+++ b/hgext/remotefilelog/fileserverclient.py
@@ -569,7 +569,7 @@  class fileserverclient(object):
             node = bin(id)
             rlog = self.repo.file(file)
             if rlog.flags(node) & revlog.REVIDX_EXTSTORED:
-                text = rlog.revision(node, raw=True)
+                text = rlog.rawdata(node)
                 p = _lfsmod.pointer.deserialize(text)
                 oid = p.oid()
                 if not store.has(oid):
diff --git a/hgext/remotefilelog/remotefilelog.py b/hgext/remotefilelog/remotefilelog.py
--- a/hgext/remotefilelog/remotefilelog.py
+++ b/hgext/remotefilelog/remotefilelog.py
@@ -262,7 +262,7 @@  class remotefilelog(object):
                 revision = None
                 delta = self.revdiff(basenode, node)
             else:
-                revision = self.revision(node, raw=True)
+                revision = self.rawdata(node)
                 delta = None
             yield revlog.revlogrevisiondelta(
                 node=node,
@@ -277,8 +277,8 @@  class remotefilelog(object):
                 )
 
     def revdiff(self, node1, node2):
-        return mdiff.textdiff(self.revision(node1, raw=True),
-                              self.revision(node2, raw=True))
+        return mdiff.textdiff(self.rawdata(node1),
+                              self.rawdata(node2))
 
     def lookup(self, node):
         if len(node) == 40:
diff --git a/hgext/remotefilelog/remotefilelogserver.py b/hgext/remotefilelog/remotefilelogserver.py
--- a/hgext/remotefilelog/remotefilelogserver.py
+++ b/hgext/remotefilelog/remotefilelogserver.py
@@ -335,7 +335,7 @@  def createfileblob(filectx):
         text = filectx.data()
     else:
         # lfs, read raw revision data
-        text = flog.revision(frev, raw=True)
+        text = flog.rawdata(frev)
 
     repo = filectx._repo