Comments
Patch
@@ -201,15 +201,16 @@ def unescapearg(escaped):
#
# supported types are:
#
# :nodes: list of binary nodes
# :csv: list of comma-separated values
+# :scsv: list of comma-separated values return as set
# :plain: string with no transformation needed.
gboptsmap = {'heads': 'nodes',
'common': 'nodes',
'obsmarkers': 'boolean',
- 'bundlecaps': 'csv',
+ 'bundlecaps': 'scsv',
'listkeys': 'csv',
'cg': 'boolean'}
# client side
@@ -358,11 +359,11 @@ class wirepeer(peer.peerrepository):
keytype = gboptsmap.get(key)
if keytype is None:
assert False, 'unexpected'
elif keytype == 'nodes':
value = encodelist(value)
- elif keytype == 'csv':
+ elif keytype in ('csv', 'scsv'):
value = ','.join(value)
elif keytype == 'boolean':
value = '%i' % bool(value)
elif keytype != 'plain':
raise KeyError('unknown getbundle option type %s'
@@ -663,10 +664,12 @@ def getbundle(repo, proto, others):
for k, v in opts.iteritems():
keytype = gboptsmap[k]
if keytype == 'nodes':
opts[k] = decodelist(v)
elif keytype == 'csv':
+ opts[k] = list(v.split(','))
+ elif keytype == 'scsv':
opts[k] = set(v.split(','))
elif keytype == 'boolean':
opts[k] = bool(v)
elif keytype != 'plain':
raise KeyError('unknown getbundle option type %s'
@@ -464,12 +464,12 @@ debug output
all remote heads known locally
no changes found
sending getbundle command
bundle2-input-bundle: with-transaction
bundle2-input-part: "listkeys" (params: 1 mandatory) supported
+ bundle2-input-part: "listkeys" (params: 1 mandatory) supported
bundle2-input-part: total payload size 45
- bundle2-input-part: "listkeys" (params: 1 mandatory) supported
bundle2-input-bundle: 1 parts total
checking for updated bookmarks
preparing listkeys for "phases"
sending listkeys command
received listkey for "phases": 15 bytes