changeset 21656:36200dc6b3bd

getbundle: raise error if extra arguments are provided for bundle10 New arguments are most likely to be supported by bundle20 (and above) only.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 29 May 2014 14:59:22 -0700
parents 35095f332846
children 0ff44e06275d
files mercurial/exchange.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.