formatter: set _first on formatter, not ui
The _first field is used for tracking when to emit a separator between
items. It seems like it's clearly formatter state, not ui state, so
let's move it there.
--- a/mercurial/formatter.py Fri Mar 10 23:07:20 2017 -0800
+++ b/mercurial/formatter.py Thu Mar 09 15:38:00 2017 -0800
@@ -305,10 +305,10 @@
baseformatter.__init__(self, ui, topic, opts, _nullconverter)
self._out = out
self._out.write("[")
- self._ui._first = True
+ self._first = True
def _showitem(self):
- if self._ui._first:
- self._ui._first = False
+ if self._first:
+ self._first = False
else:
self._out.write(",")