comparison mercurial/bundle2.py @ 24733:c00e4338fa4b

obsolete: experimental flag to get debug about obsmarkers exchange The obsolescence markers exchange is still experimental. We (developer) need more information about what is going on. I'm adding an experimental flag to add display the amount of data exchanged during bundle2 exchanges.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 14 Apr 2015 11:44:04 -0400
parents e0e28e910fa3
children bb67e52362d6
comparison
equal deleted inserted replaced
24732:8f70b529cb0c 24733:c00e4338fa4b
1215 1215
1216 @parthandler('obsmarkers') 1216 @parthandler('obsmarkers')
1217 def handleobsmarker(op, inpart): 1217 def handleobsmarker(op, inpart):
1218 """add a stream of obsmarkers to the repo""" 1218 """add a stream of obsmarkers to the repo"""
1219 tr = op.gettransaction() 1219 tr = op.gettransaction()
1220 new = op.repo.obsstore.mergemarkers(tr, inpart.read()) 1220 markerdata = inpart.read()
1221 if op.ui.config('experimental', 'obsmarkers-exchange-debug', False):
1222 op.ui.write(('obsmarker-exchange: %i bytes received\n')
1223 % len(markerdata))
1224 new = op.repo.obsstore.mergemarkers(tr, markerdata)
1221 if new: 1225 if new:
1222 op.repo.ui.status(_('%i new obsolescence markers\n') % new) 1226 op.repo.ui.status(_('%i new obsolescence markers\n') % new)
1223 op.records.add('obsmarkers', {'new': new}) 1227 op.records.add('obsmarkers', {'new': new})
1224 if op.reply is not None: 1228 if op.reply is not None:
1225 rpart = op.reply.newpart('reply:obsmarkers') 1229 rpart = op.reply.newpart('reply:obsmarkers')