# HG changeset patch # User Pierre-Yves David # Date 2014-05-29 21:59:22 # Node ID 36200dc6b3bd084eae62541f1989ad6903c6d37c # Parent 35095f3328465ae586866933b30b4fb905500615 getbundle: raise error if extra arguments are provided for bundle10 New arguments are most likely to be supported by bundle20 (and above) only. diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -664,6 +664,9 @@ def getbundle(repo, source, heads=None, cg = changegroup.getbundle(repo, source, heads=heads, common=common, bundlecaps=bundlecaps) if bundlecaps is None or 'HG2X' not in bundlecaps: + if kwargs: + raise ValueError(_('unsupported getbundle arguments: %s') + % ', '.join(sorted(kwargs.keys()))) return cg # very crude first implementation, # the bundle API will change and the generation will be done lazily.