##// END OF EJS Templates
bundle2: introduce a specific function for bundling debug message...
Pierre-Yves David -
r25313:8f2c362b default
parent child Browse files
Show More
@@ -173,6 +173,10 b' preferedchunksize = 4096'
173 173
174 174 _parttypeforbidden = re.compile('[^a-zA-Z0-9_:-]')
175 175
176 def outdebug(ui, message):
177 """debug regarding output stream (bundling)"""
178 ui.debug(message)
179
176 180 def validateparttype(parttype):
177 181 """raise ValueError if a parttype contains invalid character"""
178 182 if _parttypeforbidden.search(parttype):
@@ -464,20 +468,20 b' class bundle20(object):'
464 468
465 469 # methods used to generate the bundle2 stream
466 470 def getchunks(self):
467 self.ui.debug('start emission of %s stream\n' % self._magicstring)
471 outdebug(self.ui, 'start emission of %s stream\n' % self._magicstring)
468 472 yield self._magicstring
469 473 param = self._paramchunk()
470 self.ui.debug('bundle parameter: %s\n' % param)
474 outdebug(self.ui, 'bundle parameter: %s\n' % param)
471 475 yield _pack(_fstreamparamsize, len(param))
472 476 if param:
473 477 yield param
474 478
475 self.ui.debug('start of parts\n')
479 outdebug(self.ui, 'start of parts\n')
476 480 for part in self._parts:
477 self.ui.debug('bundle part: "%s"\n' % part.type)
481 outdebug(self.ui, 'bundle part: "%s"\n' % part.type)
478 482 for chunk in part.getchunks():
479 483 yield chunk
480 self.ui.debug('end of bundle\n')
484 outdebug(self.ui, 'end of bundle\n')
481 485 yield _pack(_fpartheadersize, 0)
482 486
483 487 def _paramchunk(self):
General Comments 0
You need to be logged in to leave comments. Login now