diff mercurial/commands.py @ 32540:f4cd4c49e302

cat: pass filename template as explicit argument I'll move the handling of the '-' filename to commands.cat().
author Yuya Nishihara <yuya@tcha.org>
date Sat, 27 May 2017 18:50:05 +0900
parents 37d70ba1d9d1
children 3b569745af6c
line wrap: on
line diff
--- a/mercurial/commands.py	Thu May 25 21:28:08 2017 +0900
+++ b/mercurial/commands.py	Sat May 27 18:50:05 2017 +0900
@@ -1363,9 +1363,10 @@
     """
     ctx = scmutil.revsingle(repo, opts.get('rev'))
     m = scmutil.match(ctx, (file1,) + pats, opts)
+    fntemplate = opts.pop('output', '')
 
     ui.pager('cat')
-    return cmdutil.cat(ui, repo, ctx, m, '', **opts)
+    return cmdutil.cat(ui, repo, ctx, m, fntemplate, '', **opts)
 
 @command('^clone',
     [('U', 'noupdate', None, _('the clone will include an empty working '