617 def debugwireargs(repo, proto, one, two, others): |
617 def debugwireargs(repo, proto, one, two, others): |
618 # only accept optional args from the known set |
618 # only accept optional args from the known set |
619 opts = options('debugwireargs', ['three', 'four'], others) |
619 opts = options('debugwireargs', ['three', 'four'], others) |
620 return repo.debugwireargs(one, two, **opts) |
620 return repo.debugwireargs(one, two, **opts) |
621 |
621 |
|
622 # List of options accepted by getbundle. |
|
623 # |
|
624 # Meant to be extended by extensions. It is the extension's responsibility to |
|
625 # ensure such options are properly processed in exchange.getbundle. |
|
626 gboptslist = ['heads', 'common', 'bundlecaps'] |
|
627 |
622 @wireprotocommand('getbundle', '*') |
628 @wireprotocommand('getbundle', '*') |
623 def getbundle(repo, proto, others): |
629 def getbundle(repo, proto, others): |
624 opts = options('getbundle', ['heads', 'common', 'bundlecaps'], others) |
630 opts = options('getbundle', gboptslist, others) |
625 for k, v in opts.iteritems(): |
631 for k, v in opts.iteritems(): |
626 if k in ('heads', 'common'): |
632 if k in ('heads', 'common'): |
627 opts[k] = decodelist(v) |
633 opts[k] = decodelist(v) |
628 elif k == 'bundlecaps': |
634 elif k == 'bundlecaps': |
629 opts[k] = set(v.split(',')) |
635 opts[k] = set(v.split(',')) |