Patchwork [cleanup] exchange: prepare kwargs for bundle2 part generation exactly once

login
register
mail settings
Submitter adgar@google.com
Date Nov. 6, 2014, 10:30 p.m.
Message ID <5de7c2528ac11ad7bc10.1415313024@adgar.nyc.corp.google.com>
Download mbox | patch
Permalink /patch/6619/
State Accepted
Headers show

Comments

adgar@google.com - Nov. 6, 2014, 10:30 p.m.
# HG changeset patch
# User Mike Edgar <adgar@google.com>
# Date 1414601168 14400
#      Wed Oct 29 12:46:08 2014 -0400
# Node ID 5de7c2528ac11ad7bc108e4d5ae01196d8c6f959
# Parent  2d54aa5397cdb1c697673ba10b7618d5ac25c69e
exchange: prepare kwargs for bundle2 part generation exactly once
Augie Fackler - Nov. 7, 2014, 3:22 p.m.
On Thu, Nov 06, 2014 at 05:30:24PM -0500, Mike Edgar wrote:
> # HG changeset patch
> # User Mike Edgar <adgar@google.com>
> # Date 1414601168 14400
> #      Wed Oct 29 12:46:08 2014 -0400
> # Node ID 5de7c2528ac11ad7bc108e4d5ae01196d8c6f959
> # Parent  2d54aa5397cdb1c697673ba10b7618d5ac25c69e
> exchange: prepare kwargs for bundle2 part generation exactly once

queued, thanks

>
> diff -r 2d54aa5397cd -r 5de7c2528ac1 mercurial/exchange.py
> --- a/mercurial/exchange.py	Sat Oct 18 01:09:41 2014 -0700
> +++ b/mercurial/exchange.py	Wed Oct 29 12:46:08 2014 -0400
> @@ -1182,10 +1182,11 @@
>              b2caps.update(bundle2.decodecaps(blob))
>      bundler = bundle2.bundle20(repo.ui, b2caps)
>
> +    kwargs['heads'] = heads
> +    kwargs['common'] = common
> +
>      for name in getbundle2partsorder:
>          func = getbundle2partsmapping[name]
> -        kwargs['heads'] = heads
> -        kwargs['common'] = common
>          func(bundler, repo, source, bundlecaps=bundlecaps, b2caps=b2caps,
>               **kwargs)
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff -r 2d54aa5397cd -r 5de7c2528ac1 mercurial/exchange.py
--- a/mercurial/exchange.py	Sat Oct 18 01:09:41 2014 -0700
+++ b/mercurial/exchange.py	Wed Oct 29 12:46:08 2014 -0400
@@ -1182,10 +1182,11 @@ 
             b2caps.update(bundle2.decodecaps(blob))
     bundler = bundle2.bundle20(repo.ui, b2caps)
 
+    kwargs['heads'] = heads
+    kwargs['common'] = common
+
     for name in getbundle2partsorder:
         func = getbundle2partsmapping[name]
-        kwargs['heads'] = heads
-        kwargs['common'] = common
         func(bundler, repo, source, bundlecaps=bundlecaps, b2caps=b2caps,
              **kwargs)