Patchwork [08,of,15] rawdata: update callers in lfs' wrapper

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 15, 2019, 10:40 a.m.
Message ID <b094039a12306e919e2a.1565865606@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/41297/
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 1565201432 -7200
#      Wed Aug 07 20:10:32 2019 +0200
# Node ID b094039a12306e919e2a5ba27e31fe1c8255f15c
# Parent  1e6c47c85559934cb827abfabe9e8c84e7674d77
# EXP-Topic rawdata
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r b094039a1230
rawdata: update callers in lfs' wrapper

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/lfs/wrapper.py b/hgext/lfs/wrapper.py
--- a/hgext/lfs/wrapper.py
+++ b/hgext/lfs/wrapper.py
@@ -169,7 +169,7 @@  def filelogaddrevision(orig, self, text,
 # Wrapping may also be applied by remotefilelog
 def filelogrenamed(orig, self, node):
     if _islfs(self, node):
-        rawtext = self._revlog.revision(node, raw=True)
+        rawtext = self._revlog.rawdata(node)
         if not rawtext:
             return False
         metadata = pointer.deserialize(rawtext)
@@ -183,7 +183,7 @@  def filelogrenamed(orig, self, node):
 def filelogsize(orig, self, rev):
     if _islfs(self, rev=rev):
         # fast path: use lfs metadata to answer size
-        rawtext = self._revlog.revision(rev, raw=True)
+        rawtext = self._revlog.rawdata(rev)
         metadata = pointer.deserialize(rawtext)
         return int(metadata['size'])
     return orig(self, rev)