Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 37597:d110167610db
formatter: carry opts to file-based formatters by basefm
This makes it slightly easier to port "hg export" to formatter.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 12 Apr 2018 23:25:58 +0900 |
parents | 8bb3899a0f47 |
children | 7a9c905e51f9 |
comparison
equal
deleted
inserted
replaced
37596:8c121a9837ca | 37597:d110167610db |
---|---|
1316 fntemplate = opts.pop('output', '') | 1316 fntemplate = opts.pop('output', '') |
1317 if cmdutil.isstdiofilename(fntemplate): | 1317 if cmdutil.isstdiofilename(fntemplate): |
1318 fntemplate = '' | 1318 fntemplate = '' |
1319 | 1319 |
1320 if fntemplate: | 1320 if fntemplate: |
1321 fm = formatter.nullformatter(ui, 'cat') | 1321 fm = formatter.nullformatter(ui, 'cat', opts) |
1322 else: | 1322 else: |
1323 ui.pager('cat') | 1323 ui.pager('cat') |
1324 fm = ui.formatter('cat', opts) | 1324 fm = ui.formatter('cat', opts) |
1325 with fm: | 1325 with fm: |
1326 return cmdutil.cat(ui, repo, ctx, m, fm, fntemplate, '', | 1326 return cmdutil.cat(ui, repo, ctx, m, fm, fntemplate, '', |