comparison mercurial/bundle2.py @ 42894:38392d5bde8e

transaction: issue "new obsmarkers" message at the end of the transaction Instead of making bundle2 code responsible for this, it seems better to have it handled and the transaction level. First, it means the message will be more consistently printed. Second it means we won't spam the message over and over if the data arrive in multiple piece. Third, we are planning to move other similar message at the same level (for the same reason) so having them all at the same location will help us to control the order they are displayed.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 14 Oct 2018 12:59:02 +0200
parents a97b12f726e4
children 181ee2118a96
comparison
equal deleted inserted replaced
42893:34a46d48d24e 42894:38392d5bde8e
2191 if not inpart.mandatory and op.repo.obsstore.readonly: 2191 if not inpart.mandatory and op.repo.obsstore.readonly:
2192 op.repo.ui.debug('ignoring obsolescence markers, feature not enabled\n') 2192 op.repo.ui.debug('ignoring obsolescence markers, feature not enabled\n')
2193 return 2193 return
2194 new = op.repo.obsstore.mergemarkers(tr, markerdata) 2194 new = op.repo.obsstore.mergemarkers(tr, markerdata)
2195 op.repo.invalidatevolatilesets() 2195 op.repo.invalidatevolatilesets()
2196 if new:
2197 op.repo.ui.status(_('%i new obsolescence markers\n') % new)
2198 op.records.add('obsmarkers', {'new': new}) 2196 op.records.add('obsmarkers', {'new': new})
2199 if op.reply is not None: 2197 if op.reply is not None:
2200 rpart = op.reply.newpart('reply:obsmarkers') 2198 rpart = op.reply.newpart('reply:obsmarkers')
2201 rpart.addparam( 2199 rpart.addparam(
2202 'in-reply-to', pycompat.bytestr(inpart.id), mandatory=False) 2200 'in-reply-to', pycompat.bytestr(inpart.id), mandatory=False)