Patchwork [15,of,15] rawdata: update callers in shallowbundle

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 15, 2019, 10:40 a.m.
Message ID <6a6fd8c0311985905619.1565865613@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/41295/
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 1565201527 -7200
#      Wed Aug 07 20:12:07 2019 +0200
# Node ID 6a6fd8c0311985905619ea3eb8df330af3ecb001
# Parent  e6c5a10e85b7c7edcaf89b34aaaa72a6b5121128
# EXP-Topic rawdata
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 6a6fd8c03119
rawdata: update callers in shallowbundle

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/shallowbundle.py b/hgext/remotefilelog/shallowbundle.py
--- a/hgext/remotefilelog/shallowbundle.py
+++ b/hgext/remotefilelog/shallowbundle.py
@@ -124,7 +124,7 @@  class shallowcg1packer(changegroup.cgpac
     def nodechunk(self, revlog, node, prevnode, linknode):
         prefix = ''
         if prevnode == nullid:
-            delta = revlog.revision(node, raw=True)
+            delta = revlog.rawdata(node)
             prefix = mdiff.trivialdiffheader(len(delta))
         else:
             # Actually uses remotefilelog.revdiff which works on nodes, not revs
@@ -267,7 +267,7 @@  def addchangegroupfiles(orig, repo, sour
         if not available(f, node, f, deltabase):
             continue
 
-        base = fl.revision(deltabase, raw=True)
+        base = fl.rawdata(deltabase)
         text = mdiff.patch(base, delta)
         if not isinstance(text, bytes):
             text = bytes(text)