Details
Details
- Reviewers
durin42 - Group Reviewers
hg-reviewers - Commits
- rHG920cca6c8462: py3: handle keyword arguments correctly in commands.py
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
| durin42 |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| :``%H``: changeset hash (40 hexadecimal digits) | :``%H``: changeset hash (40 hexadecimal digits) | ||||
| :``%R``: changeset revision number | :``%R``: changeset revision number | ||||
| :``%h``: short-form changeset hash (12 hexadecimal digits) | :``%h``: short-form changeset hash (12 hexadecimal digits) | ||||
| :``%r``: zero-padded changeset revision number | :``%r``: zero-padded changeset revision number | ||||
| :``%b``: basename of the exporting repository | :``%b``: basename of the exporting repository | ||||
| Returns 0 on success. | Returns 0 on success. | ||||
| """ | """ | ||||
| opts = pycompat.byteskwargs(opts) | |||||
| ctx = scmutil.revsingle(repo, opts.get('rev')) | ctx = scmutil.revsingle(repo, opts.get('rev')) | ||||
| m = scmutil.match(ctx, (file1,) + pats, opts) | m = scmutil.match(ctx, (file1,) + pats, opts) | ||||
| fntemplate = opts.pop('output', '') | fntemplate = opts.pop('output', '') | ||||
| if cmdutil.isstdiofilename(fntemplate): | if cmdutil.isstdiofilename(fntemplate): | ||||
| fntemplate = '' | fntemplate = '' | ||||
| if fntemplate: | if fntemplate: | ||||
| fm = formatter.nullformatter(ui, 'cat') | fm = formatter.nullformatter(ui, 'cat') | ||||
| else: | else: | ||||
| ui.pager('cat') | ui.pager('cat') | ||||
| fm = ui.formatter('cat', opts) | fm = ui.formatter('cat', opts) | ||||
| with fm: | with fm: | ||||
| return cmdutil.cat(ui, repo, ctx, m, fm, fntemplate, '', **opts) | return cmdutil.cat(ui, repo, ctx, m, fm, fntemplate, '', | ||||
| **pycompat.strkwargs(opts)) | |||||
| @command('^clone', | @command('^clone', | ||||
| [('U', 'noupdate', None, _('the clone will include an empty working ' | [('U', 'noupdate', None, _('the clone will include an empty working ' | ||||
| 'directory (only a repository)')), | 'directory (only a repository)')), | ||||
| ('u', 'updaterev', '', _('revision, tag, or branch to check out'), | ('u', 'updaterev', '', _('revision, tag, or branch to check out'), | ||||
| _('REV')), | _('REV')), | ||||
| ('r', 'rev', [], _('include the specified changeset'), _('REV')), | ('r', 'rev', [], _('include the specified changeset'), _('REV')), | ||||
| ('b', 'branch', [], _('clone only the specified branch'), _('BRANCH')), | ('b', 'branch', [], _('clone only the specified branch'), _('BRANCH')), | ||||
| @command('debugcomplete', | @command('debugcomplete', | ||||
| [('o', 'options', None, _('show the command options'))], | [('o', 'options', None, _('show the command options'))], | ||||
| _('[-o] CMD'), | _('[-o] CMD'), | ||||
| norepo=True) | norepo=True) | ||||
| def debugcomplete(ui, cmd='', **opts): | def debugcomplete(ui, cmd='', **opts): | ||||
| """returns the completion list associated with the given command""" | """returns the completion list associated with the given command""" | ||||
| if opts.get('options'): | if opts.get(r'options'): | ||||
| options = [] | options = [] | ||||
| otables = [globalopts] | otables = [globalopts] | ||||
| if cmd: | if cmd: | ||||
| aliases, entry = cmdutil.findcmd(cmd, table, False) | aliases, entry = cmdutil.findcmd(cmd, table, False) | ||||
| otables.append(entry[1]) | otables.append(entry[1]) | ||||
| for t in otables: | for t in otables: | ||||
| for o in t: | for o in t: | ||||
| if "(DEPRECATED)" in o[3]: | if "(DEPRECATED)" in o[3]: | ||||