Mercurial > hg
diff mercurial/commands.py @ 32541:3b569745af6c
cat: do not start pager if output will be written to file
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 27 May 2017 18:52:46 +0900 |
parents | f4cd4c49e302 |
children | 1b90036f42f0 |
line wrap: on
line diff
--- a/mercurial/commands.py Sat May 27 18:50:05 2017 +0900 +++ b/mercurial/commands.py Sat May 27 18:52:46 2017 +0900 @@ -1364,8 +1364,11 @@ ctx = scmutil.revsingle(repo, opts.get('rev')) m = scmutil.match(ctx, (file1,) + pats, opts) fntemplate = opts.pop('output', '') - - ui.pager('cat') + if cmdutil.isstdiofilename(fntemplate): + fntemplate = '' + + if not fntemplate: + ui.pager('cat') return cmdutil.cat(ui, repo, ctx, m, fntemplate, '', **opts) @command('^clone',