663 The -l/--list option, presents the user with a list of existing available |
662 The -l/--list option, presents the user with a list of existing available |
664 admonitions along with their title. This also includes the custom |
663 admonitions along with their title. This also includes the custom |
665 admonitions (if any). |
664 admonitions (if any). |
666 """ |
665 """ |
667 |
666 |
668 opts = pycompat.byteskwargs(opts) |
|
669 sections = releasenotessections(ui, repo) |
667 sections = releasenotessections(ui, repo) |
670 |
668 |
671 cmdutil.check_incompatible_arguments(opts, b'list', [b'rev', b'check']) |
669 cmdutil.check_incompatible_arguments(opts, 'list', ['rev', 'check']) |
672 |
670 |
673 if opts.get(b'list'): |
671 if opts.get('list'): |
674 return _getadmonitionlist(ui, sections) |
672 return _getadmonitionlist(ui, sections) |
675 |
673 |
676 rev = opts.get(b'rev') |
674 rev = opts.get('rev') |
677 revs = logcmdutil.revrange(repo, [rev or b'not public()']) |
675 revs = logcmdutil.revrange(repo, [rev or b'not public()']) |
678 if opts.get(b'check'): |
676 if opts.get('check'): |
679 return checkadmonitions(ui, repo, sections.names(), revs) |
677 return checkadmonitions(ui, repo, sections.names(), revs) |
680 |
678 |
681 incoming = parsenotesfromrevisions(repo, sections.names(), revs) |
679 incoming = parsenotesfromrevisions(repo, sections.names(), revs) |
682 |
680 |
683 if file_ is None: |
681 if file_ is None: |