Patchwork wireproto: remove gboptslist (API)

login
register
mail settings
Submitter Gregory Szorc
Date Aug. 6, 2016, 10 p.m.
Message ID <ae8feab83c33b0354483.1470520845@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/16166/
State Accepted
Headers show

Comments

Gregory Szorc - Aug. 6, 2016, 10 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1470520834 25200
#      Sat Aug 06 15:00:34 2016 -0700
# Node ID ae8feab83c33b03544831f1ee8aa2b5067fe3c3c
# Parent  3ef9aa7ad1fc4c43b92d48e4bb1f4e3de68b6910
wireproto: remove gboptslist (API)

This variable has been unused since ce25f465e572, which was over
2 years ago. gboptsmap should be used instead.

Marking as API because this could break extensions.
Pierre-Yves David - Aug. 6, 2016, 10:27 p.m.
On 08/07/2016 12:00 AM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@gmail.com>
> # Date 1470520834 25200
> #      Sat Aug 06 15:00:34 2016 -0700
> # Node ID ae8feab83c33b03544831f1ee8aa2b5067fe3c3c
> # Parent  3ef9aa7ad1fc4c43b92d48e4bb1f4e3de68b6910
> wireproto: remove gboptslist (API)
>
> This variable has been unused since ce25f465e572, which was over
> 2 years ago. gboptsmap should be used instead.
>
> Marking as API because this could break extensions.

Nice catch, pushed, thanks.

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -726,22 +726,16 @@  def changegroupsubset(repo, proto, bases
     return streamres(proto.groupchunks(cg))
 
 @wireprotocommand('debugwireargs', 'one two *')
 def debugwireargs(repo, proto, one, two, others):
     # only accept optional args from the known set
     opts = options('debugwireargs', ['three', 'four'], others)
     return repo.debugwireargs(one, two, **opts)
 
-# List of options accepted by getbundle.
-#
-# Meant to be extended by extensions. It is the extension's responsibility to
-# ensure such options are properly processed in exchange.getbundle.
-gboptslist = ['heads', 'common', 'bundlecaps']
-
 @wireprotocommand('getbundle', '*')
 def getbundle(repo, proto, others):
     opts = options('getbundle', gboptsmap.keys(), others)
     for k, v in opts.iteritems():
         keytype = gboptsmap[k]
         if keytype == 'nodes':
             opts[k] = decodelist(v)
         elif keytype == 'csv':