Show More
@@ -1794,25 +1794,22 b' def cat(ui, repo, file1, *pats, **opts):' | |||||
1794 |
|
1794 | |||
1795 | Returns 0 on success. |
|
1795 | Returns 0 on success. | |
1796 | """ |
|
1796 | """ | |
1797 | opts = pycompat.byteskwargs(opts) |
|
1797 | rev = opts.get('rev') | |
1798 | rev = opts.get(b'rev') |
|
|||
1799 | if rev: |
|
1798 | if rev: | |
1800 | repo = scmutil.unhidehashlikerevs(repo, [rev], b'nowarn') |
|
1799 | repo = scmutil.unhidehashlikerevs(repo, [rev], b'nowarn') | |
1801 | ctx = logcmdutil.revsingle(repo, rev) |
|
1800 | ctx = logcmdutil.revsingle(repo, rev) | |
1802 | m = scmutil.match(ctx, (file1,) + pats, opts) |
|
1801 | m = scmutil.match(ctx, (file1,) + pats, pycompat.byteskwargs(opts)) | |
1803 |
fntemplate = opts.pop( |
|
1802 | fntemplate = opts.pop('output', b'') | |
1804 | if cmdutil.isstdiofilename(fntemplate): |
|
1803 | if cmdutil.isstdiofilename(fntemplate): | |
1805 | fntemplate = b'' |
|
1804 | fntemplate = b'' | |
1806 |
|
1805 | |||
1807 | if fntemplate: |
|
1806 | if fntemplate: | |
1808 | fm = formatter.nullformatter(ui, b'cat', opts) |
|
1807 | fm = formatter.nullformatter(ui, b'cat', pycompat.byteskwargs(opts)) | |
1809 | else: |
|
1808 | else: | |
1810 | ui.pager(b'cat') |
|
1809 | ui.pager(b'cat') | |
1811 | fm = ui.formatter(b'cat', opts) |
|
1810 | fm = ui.formatter(b'cat', pycompat.byteskwargs(opts)) | |
1812 | with fm: |
|
1811 | with fm: | |
1813 | return cmdutil.cat( |
|
1812 | return cmdutil.cat(ui, repo, ctx, m, fm, fntemplate, b'', **opts) | |
1814 | ui, repo, ctx, m, fm, fntemplate, b'', **pycompat.strkwargs(opts) |
|
|||
1815 | ) |
|
|||
1816 |
|
1813 | |||
1817 |
|
1814 | |||
1818 | @command( |
|
1815 | @command( |
General Comments 0
You need to be logged in to leave comments.
Login now