commitcloud: remove indent from json.dumps args

Summary:
Commit cloud now uses `mercurial.json` rather than `json`.  This doesn't
support the `indent` arg, so remove this from the debug output when
`debugrequests` is enabled.

Reviewed By: farnz

Differential Revision: D21500306

fbshipit-source-id: ae436e9c32d1d2da432eeb93d114115ea80b825b
This commit is contained in:
Mark Thomas 2020-05-11 05:11:03 -07:00 committed by Facebook GitHub Bot
parent 26f6dc8fb3
commit 02e35c7039

View File

@ -129,7 +129,7 @@ class HttpsCommitCloudService(baseservice.BaseService):
rdata = None
# print request if debugrequests and debug are both on
if self.debugrequests:
self.ui.debug("%s\n" % json.dumps(cleandict(data), indent=4))
self.ui.debug("%s\n" % json.dumps(cleandict(data)))
if self._getheader("Content-Encoding") == "gzip":
buffer = util.stringio()
with gzip.GzipFile(fileobj=buffer, mode="w") as compressed:
@ -159,7 +159,7 @@ class HttpsCommitCloudService(baseservice.BaseService):
data = json.load(resp)
# print response if debugrequests and debug are both on
if self.debugrequests:
self.ui.debug("%s\n" % json.dumps(cleandict(data), indent=4))
self.ui.debug("%s\n" % json.dumps(cleandict(data)))
return data
except httplib.HTTPException:
self.connection.close()