Patchwork [5,of,6,main-line-of-works,(22,more,patches,to,go)] ] bundle2: add generic debug output regarding processed interruption

login
register
mail settings
Submitter Pierre-Yves David
Date May 28, 2015, 7:54 p.m.
Message ID <a6c2d25003affc2378de.1432842862@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/9338/
State Accepted
Headers show

Comments

Pierre-Yves David - May 28, 2015, 7:54 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1432709239 25200
#      Tue May 26 23:47:19 2015 -0700
# Node ID a6c2d25003affc2378de4ab866e1b72d345a486b
# Parent  4112345562d77185304a0fbb4b9131a851851522
bundle2: add generic debug output regarding processed interruption

If we are about to hide the detailed debug output, we need some generic debug
message to replace it in a concise way.

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -899,18 +899,23 @@  class interrupthandler(unpackermixin):
         if headersize:
             return self._readexact(headersize)
         return None
 
     def __call__(self):
+
+        self.ui.debug('bundle2-input-stream-interrupt:'
+                      ' opening out of band context\n')
         indebug(self.ui, 'bundle2 stream interruption, looking for a part.')
         headerblock = self._readpartheader()
         if headerblock is None:
             indebug(self.ui, 'no part found during interruption.')
             return
         part = unbundlepart(self.ui, headerblock, self._fp)
         op = interruptoperation(self.ui)
         _processpart(op, part)
+        self.ui.debug('bundle2-input-stream-interrupt:'
+                      ' closing out of band context\n')
 
 class interruptoperation(object):
     """A limited operation to be use by part handler during interruption
 
     It only have access to an ui object.