# HG changeset patch # User Mike Edgar # Date 2014-10-29 16:46:08 # Node ID 0e78ea8e592a64ed28d51907af94114592261c32 # Parent 2f12ac53b528cdaf424f11964853cb797892d5da exchange: prepare kwargs for bundle2 part generation exactly once diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -1182,10 +1182,11 @@ def getbundle(repo, source, heads=None, 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)