[PATCH remotefilelog-ext] fileserverclient: make iterbatch() case work with new store

Martin von Zweigbergk martinvonz at google.com
Fri May 20 16:10:57 EDT 2016


On Fri, May 20, 2016 at 9:21 AM, Durham Goode <durham at fb.com> wrote:
> Do no tests execute this code path?  Can we add a test if not?  That way I don’t break you guys when doing future refactors.

After spending some time to figure out how it worked, it turned out to
be relatively simple. v2 coming up.

>
> On 5/19/16, 1:58 AM, "Martin von Zweigbergk" <martinvonz at google.com> wrote:
>
>># HG changeset patch
>># User Martin von Zweigbergk <martinvonz at google.com>
>># Date 1463636360 25200
>>#      Wed May 18 22:39:20 2016 -0700
>># Node ID e1d21752505c55a83509685159d6ed8d4b50d6ae
>># Parent  3df8af03df789dee35c6026fce5ec1a59b43cca0
>>fileserverclient: make iterbatch() case work with new store
>>
>>The iterbatch() handling added in 08ca5042a8a1 (fileserverclient: use
>>new iterbatch() method, 2016-03-22) was broken by 06d5f64ccb7c (store:
>>change fileserviceclient to write via new store, 2016-04-04). Fix it
>>by copying the pattern introduced elsewhere in that change.
>>
>>diff -r 3df8af03df78 -r e1d21752505c remotefilelog/fileserverclient.py
>>--- a/remotefilelog/fileserverclient.py        Mon Jan 04 21:32:21 2016 -0800
>>+++ b/remotefilelog/fileserverclient.py        Wed May 18 22:39:20 2016 -0700
>>@@ -146,7 +146,9 @@
>>             b.getfile(file_, node)
>>         b.submit()
>>         for m, r in itertools.izip(missed, b.results()):
>>-            receivemissing(io.BytesIO('%d\n%s' % (len(r), r)), m)
>>+            file_ = idmap[m]
>>+            node = m[-40:]
>>+            receivemissing(io.BytesIO('%d\n%s' % (len(r), r)), file_, node)
>>             progresstick()
>>         return
>>     while missed:
>


More information about the Mercurial-devel mailing list