mercurial/wireproto.py
branchstable
changeset 21615 3cb2da25b171
parent 21186 9f3652e851f8
child 21631 9bafe09285f2
equal deleted inserted replaced
21584:4dca1a06e7ee 21615:3cb2da25b171
   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(','))