Patchwork [2,of,2] localrepo.getbundle: drop unused 'format' argument

login
register
mail settings
Submitter Martin von Zweigbergk
Date April 7, 2015, 4 p.m.
Message ID <fc4b8dd3705298b4a4a0.1428422442@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/8535/
State Accepted
Commit c79b1e69011017235d94332483ee92a96157be90
Headers show

Comments

Martin von Zweigbergk - April 7, 2015, 4 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1428421552 25200
#      Tue Apr 07 08:45:52 2015 -0700
# Node ID fc4b8dd3705298b4a4a0ef943e405d615c602fba
# Parent  7b78fb866c1fb337bb1d740853edc508a932d6b8
localrepo.getbundle: drop unused 'format' argument

The 'format' argument was not used even when it was added in
60ad2ea5b106 (getbundle: pass arbitrary arguments all along the call
chain, 2014-04-17).

Note that by removing the argument, if any caller did pass a named
'format' argument, we will now pass that along to exchange.getbundle()
via the kwargs. If the idea was to remove such a key, that should have
been done explicitly.
Pierre-Yves David - April 7, 2015, 4:34 p.m.
On 04/07/2015 09:00 AM, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1428421552 25200
> #      Tue Apr 07 08:45:52 2015 -0700
> # Node ID fc4b8dd3705298b4a4a0ef943e405d615c602fba
> # Parent  7b78fb866c1fb337bb1d740853edc508a932d6b8
> localrepo.getbundle: drop unused 'format' argument

I suspect remotefilelog to use that. I'll check it this morning
Durham Goode - April 7, 2015, 5:04 p.m.
On 4/7/15 9:34 AM, Pierre-Yves David wrote:
>
>
> On 04/07/2015 09:00 AM, Martin von Zweigbergk wrote:
>> # HG changeset patch
>> # User Martin von Zweigbergk <martinvonz@google.com>
>> # Date 1428421552 25200
>> #      Tue Apr 07 08:45:52 2015 -0700
>> # Node ID fc4b8dd3705298b4a4a0ef943e405d615c602fba
>> # Parent  7b78fb866c1fb337bb1d740853edc508a932d6b8
>> localrepo.getbundle: drop unused 'format' argument
>
> I suspect remotefilelog to use that. I'll check it this morning
>
remotefilelog uses the bundlecaps arg, but I don't see it using format 
anywhere.
Pierre-Yves David - April 7, 2015, 5:43 p.m.
On 04/07/2015 10:04 AM, Durham Goode wrote:
>
>
> On 4/7/15 9:34 AM, Pierre-Yves David wrote:
>>
>>
>> On 04/07/2015 09:00 AM, Martin von Zweigbergk wrote:
>>> # HG changeset patch
>>> # User Martin von Zweigbergk <martinvonz@google.com>
>>> # Date 1428421552 25200
>>> #      Tue Apr 07 08:45:52 2015 -0700
>>> # Node ID fc4b8dd3705298b4a4a0ef943e405d615c602fba
>>> # Parent  7b78fb866c1fb337bb1d740853edc508a932d6b8
>>> localrepo.getbundle: drop unused 'format' argument
>>
>> I suspect remotefilelog to use that. I'll check it this morning
>>
> remotefilelog uses the bundlecaps arg, but I don't see it using format
> anywhere.

That :)

However, I'll double check this format, it feel like it is here for a 
reason.
Pierre-Yves David - April 7, 2015, 7:41 p.m.
On 04/07/2015 10:43 AM, Pierre-Yves David wrote:
>
>
> On 04/07/2015 10:04 AM, Durham Goode wrote:
>>
>>
>> On 4/7/15 9:34 AM, Pierre-Yves David wrote:
>>>
>>>
>>> On 04/07/2015 09:00 AM, Martin von Zweigbergk wrote:
>>>> # HG changeset patch
>>>> # User Martin von Zweigbergk <martinvonz@google.com>
>>>> # Date 1428421552 25200
>>>> #      Tue Apr 07 08:45:52 2015 -0700
>>>> # Node ID fc4b8dd3705298b4a4a0ef943e405d615c602fba
>>>> # Parent  7b78fb866c1fb337bb1d740853edc508a932d6b8
>>>> localrepo.getbundle: drop unused 'format' argument
>>>
>>> I suspect remotefilelog to use that. I'll check it this morning
>>>
>> remotefilelog uses the bundlecaps arg, but I don't see it using format
>> anywhere.
>
> That :)
>
> However, I'll double check this format, it feel like it is here for a
> reason.

This looks like a the remains of an aborted route that I failed to clean 
properly. pushed to the clowncopter.

Nice catch!

>

Patch

diff -r 7b78fb866c1f -r fc4b8dd37052 mercurial/localrepo.py
--- a/mercurial/localrepo.py	Tue Apr 07 08:30:11 2015 -0700
+++ b/mercurial/localrepo.py	Tue Apr 07 08:45:52 2015 -0700
@@ -107,7 +107,7 @@ 
         return self._repo.known(nodes)
 
     def getbundle(self, source, heads=None, common=None, bundlecaps=None,
-                  format='HG10', **kwargs):
+                  **kwargs):
         cg = exchange.getbundle(self._repo, source, heads=heads,
                                 common=common, bundlecaps=bundlecaps, **kwargs)
         if bundlecaps is not None and 'HG2Y' in bundlecaps: