getbundle: raise error if extra arguments are provided for bundle10
New arguments are most likely to be supported by bundle20 (and above) only.
--- a/mercurial/exchange.py Tue May 27 15:42:03 2014 -0700
+++ b/mercurial/exchange.py Thu May 29 14:59:22 2014 -0700
@@ -664,6 +664,9 @@
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.