# HG changeset patch # User Matt Mackall # Date 2014-09-13 00:06:11 # Node ID 1f72226064b8df093317edfd37c8b4472ca1ba22 # Parent edf07a804ac41433e37d92a9809c6a9ec669c8ad formatter: make debug style match Python syntax diff --git a/mercurial/formatter.py b/mercurial/formatter.py --- a/mercurial/formatter.py +++ b/mercurial/formatter.py @@ -67,12 +67,12 @@ class plainformatter(baseformatter): class debugformatter(baseformatter): def __init__(self, ui, topic, opts): baseformatter.__init__(self, ui, topic, opts) - self._ui.write("%s = {\n" % self._topic) + self._ui.write("%s = [\n" % self._topic) def _showitem(self): self._ui.write(" " + repr(self._item) + ",\n") def end(self): baseformatter.end(self) - self._ui.write("}\n") + self._ui.write("]\n") def formatter(ui, topic, opts): if ui.configbool('ui', 'formatdebug'): diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -350,6 +350,11 @@ warning message about such pattern. $ hg status -A --rev 1 1 R 1/2/3/4/5/b.txt + $ hg status --config ui.formatdebug=True --rev 1 1 + status = [ + {*'path': '1/2/3/4/5/b.txt'*}, (glob) + ] + #if windows $ hg --config ui.slash=false status -A --rev 1 1 R 1\2\3\4\5\b.txt