Details
Details
- Reviewers
yuja - Group Reviewers
hg-reviewers - Commits
- rHGe68dd1909af3: py3: handle keyword arguments in hgext/releasenotes.py
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| yuja |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| import textwrap | import textwrap | ||||
| from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
| from mercurial import ( | from mercurial import ( | ||||
| config, | config, | ||||
| error, | error, | ||||
| minirst, | minirst, | ||||
| node, | node, | ||||
| pycompat, | |||||
| registrar, | registrar, | ||||
| scmutil, | scmutil, | ||||
| util, | util, | ||||
| ) | ) | ||||
| cmdtable = {} | cmdtable = {} | ||||
| command = registrar.command(cmdtable) | command = registrar.command(cmdtable) | ||||
| release note after it has been added to the release notes file. | release note after it has been added to the release notes file. | ||||
| The -c/--check option checks the commit message for invalid admonitions. | The -c/--check option checks the commit message for invalid admonitions. | ||||
| The -l/--list option, presents the user with a list of existing available | The -l/--list option, presents the user with a list of existing available | ||||
| admonitions along with their title. This also includes the custom | admonitions along with their title. This also includes the custom | ||||
| admonitions (if any). | admonitions (if any). | ||||
| """ | """ | ||||
| opts = pycompat.byteskwargs(opts) | |||||
| sections = releasenotessections(ui, repo) | sections = releasenotessections(ui, repo) | ||||
| listflag = opts.get('list') | listflag = opts.get('list') | ||||
| if listflag and opts.get('rev'): | if listflag and opts.get('rev'): | ||||
| raise error.Abort(_('cannot use both \'--list\' and \'--rev\'')) | raise error.Abort(_('cannot use both \'--list\' and \'--rev\'')) | ||||
| if listflag and opts.get('check'): | if listflag and opts.get('check'): | ||||
| raise error.Abort(_('cannot use both \'--list\' and \'--check\'')) | raise error.Abort(_('cannot use both \'--list\' and \'--check\'')) | ||||