formatter: make debug output prettier
"(glob)" won't be needed since pprintgen() can print dict items in stable
order.
--- a/mercurial/formatter.py Sun Oct 14 07:23:02 2018 +0200
+++ b/mercurial/formatter.py Sun Oct 14 07:25:01 2018 +0200
@@ -324,7 +324,8 @@
self._out = out
self._out.write("%s = [\n" % self._topic)
def _showitem(self):
- self._out.write(' %s,\n' % stringutil.pprint(self._item))
+ self._out.write(' %s,\n'
+ % stringutil.pprint(self._item, indent=4, level=1))
def end(self):
baseformatter.end(self)
self._out.write("]\n")
--- a/tests/test-status.t Sun Oct 14 07:23:02 2018 +0200
+++ b/tests/test-status.t Sun Oct 14 07:25:01 2018 +0200
@@ -528,7 +528,10 @@
$ hg status --config ui.formatdebug=True --rev 1 1
status = [
- {*'path': '1/2/3/4/5/b.txt'*}, (glob)
+ {
+ 'path': '1/2/3/4/5/b.txt',
+ 'status': 'R'
+ },
]
#if windows