diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -1217,7 +1217,11 @@ def handlepushkeyreply(op, inpart): def handleobsmarker(op, inpart): """add a stream of obsmarkers to the repo""" tr = op.gettransaction() - new = op.repo.obsstore.mergemarkers(tr, inpart.read()) + markerdata = inpart.read() + if op.ui.config('experimental', 'obsmarkers-exchange-debug', False): + op.ui.write(('obsmarker-exchange: %i bytes received\n') + % len(markerdata)) + new = op.repo.obsstore.mergemarkers(tr, markerdata) if new: op.repo.ui.status(_('%i new obsolescence markers\n') % new) op.records.add('obsmarkers', {'new': new}) diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t --- a/tests/test-obsolete.t +++ b/tests/test-obsolete.t @@ -616,6 +616,15 @@ List of both #if serve +Test the debug output for exchange +---------------------------------- + + $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' --config 'experimental.bundle2-exp=True' + pulling from ../tmpb + searching for changes + no changes found + obsmarker-exchange: 346 bytes received + check hgweb does not explode ====================================