bundle2: add an obsmarkers part handler

This part contains a binary stream of obsolescence markers. Received markers are
added to the repository.
This commit is contained in:
Pierre-Yves David 2014-08-25 18:08:22 +02:00
parent d8f05095f7
commit fc505cbe59

View File

@ -899,3 +899,9 @@ def handlepushkeyreply(op, inpart):
ret = int(inpart.params['return']) ret = int(inpart.params['return'])
partid = int(inpart.params['in-reply-to']) partid = int(inpart.params['in-reply-to'])
op.records.add('pushkey', {'return': ret}, partid) op.records.add('pushkey', {'return': ret}, partid)
@parthandler('b2x:obsmarkers')
def handleobsmarker(op, inpart):
"""add a stream of obsmarkers to the repo"""
tr = op.gettransaction()
op.repo.obsstore.mergemarkers(tr, inpart.read())