Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 37598:7a9c905e51f9
export: do not start pager if output will be written to file
A copy of 3b569745af6c.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 12 Apr 2018 21:33:47 +0900 |
parents | d110167610db |
children | daafaff4e5be |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Apr 12 23:25:58 2018 +0900 +++ b/mercurial/commands.py Thu Apr 12 21:33:47 2018 +0900 @@ -1971,8 +1971,14 @@ ui.note(_('exporting patches:\n')) else: ui.note(_('exporting patch:\n')) - ui.pager('export') - cmdutil.export(repo, revs, fntemplate=opts.get('output'), + + fntemplate = opts.get('output') + if cmdutil.isstdiofilename(fntemplate): + fntemplate = '' + + if not fntemplate: + ui.pager('export') + cmdutil.export(repo, revs, fntemplate=fntemplate, switch_parent=opts.get('switch_parent'), opts=patch.diffallopts(ui, opts))