Mercurial > hg-stable
changeset 31307:59d09565ac77
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.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 09 Mar 2017 15:38:00 -0800 |
parents | f5c71e98f0f7 |
children | 90e69badb125 |
files | mercurial/formatter.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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(",")