Skip to content
Snippets Groups Projects
Commit 35095f33 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

bundle: introduce a listkey handler

This makes it possible to handle listkeys-related data stored in a bundle2.
There are no producers yet.
parent ddf9a00c
No related branches found
No related tags found
No related merge requests found
......@@ -146,6 +146,7 @@
import struct
import urllib
import string
import pushkey
import changegroup, error
from i18n import _
......@@ -860,3 +861,10 @@
def handlereplycaps(op, inpart):
"""Used to transmit push race error over the wire"""
raise error.ResponseError(_('push failed:'), inpart.params['message'])
@parthandler('b2x:listkeys', ('namespace',))
def handlelistkeys(op, inpart):
"""retrieve pushkey namespace content stored in a bundle2"""
namespace = inpart.params['namespace']
r = pushkey.decodekeys(inpart.read())
op.records.add('listkeys', (namespace, r))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment