Show More
@@ -310,12 +310,13 b' class changesetprinter(object):' | |||
|
310 | 310 | if stat or diff: |
|
311 | 311 | self.ui.write("\n") |
|
312 | 312 | |
|
313 |
class |
|
|
314 |
|
|
|
313 | class changesetformatter(changesetprinter): | |
|
314 | """Format changeset information by generic formatter""" | |
|
315 | 315 | |
|
316 |
def __init__(self, ui, repo, differ=None, diffopts=None, |
|
|
316 | def __init__(self, ui, repo, fm, differ=None, diffopts=None, | |
|
317 | buffered=False): | |
|
317 | 318 | changesetprinter.__init__(self, ui, repo, differ, diffopts, buffered) |
|
318 | self._fm = formatter.jsonformatter(ui, ui, 'log', {}) | |
|
319 | self._fm = fm | |
|
319 | 320 | |
|
320 | 321 | def close(self): |
|
321 | 322 | self._fm.end() |
@@ -519,7 +520,8 b' def changesetdisplayer(ui, repo, opts, d' | |||
|
519 | 520 | """ |
|
520 | 521 | postargs = (differ, opts, buffered) |
|
521 | 522 | if opts.get('template') == 'json': |
|
522 | return jsonchangeset(ui, repo, *postargs) | |
|
523 | fm = ui.formatter('log', opts) | |
|
524 | return changesetformatter(ui, repo, fm, *postargs) | |
|
523 | 525 | |
|
524 | 526 | spec = _lookuptemplate(ui, opts.get('template'), opts.get('style')) |
|
525 | 527 |
General Comments 0
You need to be logged in to leave comments.
Login now