Skip to content
Snippets Groups Projects
Commit 21a25fb8 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

bundle2: add generic debug output regarding generated parts

If we are about to hide the detailed debug output, we need some generic debug
message to replace it in a concise way.
parent 1f7c0403
No related branches found
No related tags found
No related merge requests found
......@@ -736,6 +736,29 @@
if self._generated is not None:
raise RuntimeError('part can only be consumed once')
self._generated = False
if ui.debugflag:
msg = ['bundle2-output-part: "%s"' % self.type]
if not self.mandatory:
msg.append(' (advisory)')
nbmp = len(self.mandatoryparams)
nbap = len(self.advisoryparams)
if nbmp or nbap:
msg.append(' (params:')
if nbmp:
msg.append(' %i mandatory' % nbmp)
if nbap:
msg.append(' %i advisory' % nbmp)
msg.append(')')
if not self.data:
msg.append(' empty payload')
elif util.safehasattr(self.data, 'next'):
msg.append(' streamed payload')
else:
msg.append(' %i bytes payload' % len(self.data))
msg.append('\n')
ui.debug(''.join(msg))
#### header
if self.mandatory:
parttype = self.type.upper()
......
......@@ -390,7 +390,8 @@
bundle2-output: bundle parameter:
bundle2-output: start of parts
bundle2-output: bundle part: "test:empty"
bundle2-output-part: "test:empty" (advisory) empty payload
bundle2-output: part 0: "test:empty"
bundle2-output: header chunk size: 17
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:empty"
......@@ -393,8 +394,9 @@
bundle2-output: part 0: "test:empty"
bundle2-output: header chunk size: 17
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:empty"
bundle2-output-part: "test:empty" (advisory) empty payload
bundle2-output: part 1: "test:empty"
bundle2-output: header chunk size: 17
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:song"
......@@ -397,9 +399,10 @@
bundle2-output: part 1: "test:empty"
bundle2-output: header chunk size: 17
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:song"
bundle2-output-part: "test:song" (advisory) 178 bytes payload
bundle2-output: part 2: "test:song"
bundle2-output: header chunk size: 16
bundle2-output: payload chunk size: 178
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:debugreply"
......@@ -401,9 +404,10 @@
bundle2-output: part 2: "test:song"
bundle2-output: header chunk size: 16
bundle2-output: payload chunk size: 178
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:debugreply"
bundle2-output-part: "test:debugreply" (advisory) empty payload
bundle2-output: part 3: "test:debugreply"
bundle2-output: header chunk size: 22
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:math"
......@@ -406,9 +410,10 @@
bundle2-output: part 3: "test:debugreply"
bundle2-output: header chunk size: 22
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:math"
bundle2-output-part: "test:math" (advisory) (params: 2 mandatory 2 advisory) 2 bytes payload
bundle2-output: part 4: "test:math"
bundle2-output: header chunk size: 43
bundle2-output: payload chunk size: 2
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:song"
......@@ -410,9 +415,10 @@
bundle2-output: part 4: "test:math"
bundle2-output: header chunk size: 43
bundle2-output: payload chunk size: 2
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:song"
bundle2-output-part: "test:song" (advisory) (params: 1 mandatory) empty payload
bundle2-output: part 5: "test:song"
bundle2-output: header chunk size: 29
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:ping"
......@@ -415,7 +421,8 @@
bundle2-output: part 5: "test:song"
bundle2-output: header chunk size: 29
bundle2-output: closing payload chunk
bundle2-output: bundle part: "test:ping"
bundle2-output-part: "test:ping" (advisory) empty payload
bundle2-output: part 6: "test:ping"
bundle2-output: header chunk size: 16
bundle2-output: closing payload chunk
......@@ -741,6 +748,7 @@
bundle2-output: bundle parameter:
bundle2-output: start of parts
bundle2-output: bundle part: "changegroup"
bundle2-output-part: "changegroup" (advisory) streamed payload
bundle2-output: part 0: "changegroup"
bundle2-output: header chunk size: 18
bundling: 1/4 changesets (25.00%)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment