comparison mercurial/formatter.py @ 51700:7f0cb9ee0534

Backout accidental publication of a large range of revisions I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 23 Jul 2024 10:02:46 +0200
parents 493034cc3265
children ca7bde5dbafb
comparison
equal deleted inserted replaced
51699:bd1483fd7088 51700:7f0cb9ee0534
174 '''convert iterable to appropriate list format''' 174 '''convert iterable to appropriate list format'''
175 return list(data) 175 return list(data)
176 176
177 177
178 class baseformatter: 178 class baseformatter:
179
179 # set to True if the formater output a strict format that does not support 180 # set to True if the formater output a strict format that does not support
180 # arbitrary output in the stream. 181 # arbitrary output in the stream.
181 strict_format = False 182 strict_format = False
182 183
183 def __init__(self, ui, topic, opts, converter): 184 def __init__(self, ui, topic, opts, converter):
418 baseformatter.end(self) 419 baseformatter.end(self)
419 self._out.write(cborutil.BREAK) 420 self._out.write(cborutil.BREAK)
420 421
421 422
422 class jsonformatter(baseformatter): 423 class jsonformatter(baseformatter):
424
423 strict_format = True 425 strict_format = True
424 426
425 def __init__(self, ui, out, topic, opts): 427 def __init__(self, ui, out, topic, opts):
426 baseformatter.__init__(self, ui, topic, opts, _nullconverter) 428 baseformatter.__init__(self, ui, topic, opts, _nullconverter)
427 self._out = out 429 self._out = out