diff mercurial/bundle2.py @ 25334:76cba1ecf55f

bundle2: add generic debug output regarding processed part payload If we are about to hide the detailed debug output, we need some generic debug message to replace it in a concise way.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 26 May 2015 23:58:38 -0700
parents 5bfffdbdc907
children 8f7137a85a0e
line wrap: on
line diff
--- a/mercurial/bundle2.py	Tue May 26 23:36:31 2015 -0700
+++ b/mercurial/bundle2.py	Tue May 26 23:58:38 2015 -0700
@@ -1060,9 +1060,12 @@
             data = self._payloadstream.read()
         else:
             data = self._payloadstream.read(size)
+        self._pos += len(data)
         if size is None or len(data) < size:
+            if not self.consumed and self._pos:
+                self.ui.debug('bundle2-input-part: total payload size %i\n'
+                              % self._pos)
             self.consumed = True
-        self._pos += len(data)
         return data
 
     def tell(self):