450 |
450 |
451 def debugwireargs(self, one, two, three=None, four=None, five=None): |
451 def debugwireargs(self, one, two, three=None, four=None, five=None): |
452 # don't pass optional arguments left at their default value |
452 # don't pass optional arguments left at their default value |
453 opts = {} |
453 opts = {} |
454 if three is not None: |
454 if three is not None: |
455 opts['three'] = three |
455 opts[r'three'] = three |
456 if four is not None: |
456 if four is not None: |
457 opts['four'] = four |
457 opts[r'four'] = four |
458 return self._call('debugwireargs', one=one, two=two, **opts) |
458 return self._call('debugwireargs', one=one, two=two, **opts) |
459 |
459 |
460 def _call(self, cmd, **args): |
460 def _call(self, cmd, **args): |
461 """execute <cmd> on the server |
461 """execute <cmd> on the server |
462 |
462 |
815 |
815 |
816 @wireprotocommand('debugwireargs', 'one two *') |
816 @wireprotocommand('debugwireargs', 'one two *') |
817 def debugwireargs(repo, proto, one, two, others): |
817 def debugwireargs(repo, proto, one, two, others): |
818 # only accept optional args from the known set |
818 # only accept optional args from the known set |
819 opts = options('debugwireargs', ['three', 'four'], others) |
819 opts = options('debugwireargs', ['three', 'four'], others) |
820 return repo.debugwireargs(one, two, **opts) |
820 return repo.debugwireargs(one, two, **pycompat.strkwargs(opts)) |
821 |
821 |
822 @wireprotocommand('getbundle', '*') |
822 @wireprotocommand('getbundle', '*') |
823 def getbundle(repo, proto, others): |
823 def getbundle(repo, proto, others): |
824 opts = options('getbundle', gboptsmap.keys(), others) |
824 opts = options('getbundle', gboptsmap.keys(), others) |
825 for k, v in opts.iteritems(): |
825 for k, v in opts.iteritems(): |