Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/bundle2.py @ 25322:1f7c0403f8be
bundle2: add generic debug output regarding generated bundle
If we are about to hide the detailed debug output, we need some generic debug
message to replace it in a more compact way.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 27 May 2015 00:10:30 -0700 |
parents | b44ee346211f |
children | 21a25fb81d2c |
comparison
equal
deleted
inserted
replaced
25321:b44ee346211f | 25322:1f7c0403f8be |
---|---|
470 self.addpart(part) | 470 self.addpart(part) |
471 return part | 471 return part |
472 | 472 |
473 # methods used to generate the bundle2 stream | 473 # methods used to generate the bundle2 stream |
474 def getchunks(self): | 474 def getchunks(self): |
475 if self.ui.debugflag: | |
476 msg = ['bundle2-output-bundle: "%s",' % self._magicstring] | |
477 if self._params: | |
478 msg.append(' (%i params)' % len(self._params)) | |
479 msg.append(' %i parts total\n' % len(self._parts)) | |
480 self.ui.debug(''.join(msg)) | |
475 outdebug(self.ui, 'start emission of %s stream' % self._magicstring) | 481 outdebug(self.ui, 'start emission of %s stream' % self._magicstring) |
476 yield self._magicstring | 482 yield self._magicstring |
477 param = self._paramchunk() | 483 param = self._paramchunk() |
478 outdebug(self.ui, 'bundle parameter: %s' % param) | 484 outdebug(self.ui, 'bundle parameter: %s' % param) |
479 yield _pack(_fstreamparamsize, len(param)) | 485 yield _pack(_fstreamparamsize, len(param)) |