Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
32539:447bbd970047 | 32540:f4cd4c49e302 |
---|---|
1361 | 1361 |
1362 Returns 0 on success. | 1362 Returns 0 on success. |
1363 """ | 1363 """ |
1364 ctx = scmutil.revsingle(repo, opts.get('rev')) | 1364 ctx = scmutil.revsingle(repo, opts.get('rev')) |
1365 m = scmutil.match(ctx, (file1,) + pats, opts) | 1365 m = scmutil.match(ctx, (file1,) + pats, opts) |
1366 fntemplate = opts.pop('output', '') | |
1366 | 1367 |
1367 ui.pager('cat') | 1368 ui.pager('cat') |
1368 return cmdutil.cat(ui, repo, ctx, m, '', **opts) | 1369 return cmdutil.cat(ui, repo, ctx, m, fntemplate, '', **opts) |
1369 | 1370 |
1370 @command('^clone', | 1371 @command('^clone', |
1371 [('U', 'noupdate', None, _('the clone will include an empty working ' | 1372 [('U', 'noupdate', None, _('the clone will include an empty working ' |
1372 'directory (only a repository)')), | 1373 'directory (only a repository)')), |
1373 ('u', 'updaterev', '', _('revision, tag, or branch to check out'), | 1374 ('u', 'updaterev', '', _('revision, tag, or branch to check out'), |