Mercurial > public > mercurial-scm > hg-stable
diff mercurial/bundle2.py @ 20842:938718d72624
bundle2: print debug information during bundling
The bundler class is now feed with an ui object and use it to transmit data
about the bundling process.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 18 Mar 2014 19:07:10 -0700 |
parents | 8532f5e1b9df |
children | 0641b41b0b49 |
line wrap: on
line diff
--- a/mercurial/bundle2.py Wed Mar 19 02:36:21 2014 -0700 +++ b/mercurial/bundle2.py Tue Mar 18 19:07:10 2014 -0700 @@ -97,7 +97,8 @@ This object does not support payload part yet.""" - def __init__(self): + def __init__(self, ui): + self.ui = ui self._params = [] self._parts = [] @@ -110,8 +111,10 @@ self._params.append((name, value)) def getchunks(self): + self.ui.debug('start emission of %s stream\n' % _magicstring) yield _magicstring param = self._paramchunk() + self.ui.debug('bundle parameter: %s\n' % param) yield _pack(_fstreamparamsize, len(param)) if param: yield param @@ -119,6 +122,7 @@ # no support for parts # to be obviously fixed soon. assert not self._parts + self.ui.debug('end of bundle\n') yield '\0\0' def _paramchunk(self):