mercurial/bundle2.py
changeset 22340 394a17de6a2d
parent 22338 8fcd56095d3b
child 22341 2d16b39601b5
equal deleted inserted replaced
22339:9680da73cfe0 22340:394a17de6a2d
   906     tr = op.gettransaction()
   906     tr = op.gettransaction()
   907     new = op.repo.obsstore.mergemarkers(tr, inpart.read())
   907     new = op.repo.obsstore.mergemarkers(tr, inpart.read())
   908     if new:
   908     if new:
   909         op.repo.ui.status(_('%i new obsolescence markers\n') % new)
   909         op.repo.ui.status(_('%i new obsolescence markers\n') % new)
   910     op.records.add('obsmarkers', {'new': new})
   910     op.records.add('obsmarkers', {'new': new})
       
   911     if op.reply is not None:
       
   912         rpart = op.reply.newpart('b2x:reply:obsmarkers')
       
   913         rpart.addparam('in-reply-to', str(inpart.id), mandatory=False)
       
   914         rpart.addparam('new', '%i' % new, mandatory=False)
       
   915 
       
   916 
       
   917 @parthandler('b2x:reply:obsmarkers', ('new', 'in-reply-to'))
       
   918 def handlepushkeyreply(op, inpart):
       
   919     """retrieve the result of a pushkey request"""
       
   920     ret = int(inpart.params['new'])
       
   921     partid = int(inpart.params['in-reply-to'])
       
   922     op.records.add('obsmarkers', {'new': ret}, partid)