# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 2018-08-31 15:57:14
# Node ID 3fe028b657bf5397c5fd430427354e79248ec38b
# Parent  1467b6c27ff929dc9601ad38d2f8bd4a259f08a3

httppeer: log commands for version 2 peer

This will aid testing and debugging.

Differential Revision: https://phab.mercurial-scm.org/D4437

diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -36,6 +36,7 @@ from . import (
 )
 from .utils import (
     interfaceutil,
+    stringutil,
 )
 
 httplib = util.httplib
@@ -557,7 +558,10 @@ def sendv2request(ui, opener, requestbui
     else:
         url += '/%s' % requests[0][0]
 
+    ui.debug('sending %d commands\n' % len(requests))
     for command, args, f in requests:
+        ui.debug('sending command %s: %s\n' % (
+            command, stringutil.pprint(args, indent=2)))
         assert not list(handler.callcommand(command, args, f))
 
     # TODO stream this.