D454: releasenotes: view admonition titles using -a flag

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Mon Aug 21 11:55:09 UTC 2017


pulkit requested changes to this revision.
pulkit added a comment.
This revision now requires changes to proceed.


  The patch in general looks good to me. I have some inline comments.

INLINE COMMENTS

> releasenotes.py:278
>  
> +def getadmonitionlist(ui, sections):
> +    for section in sections._sections:

Generally we add a '_' before an internal function. Since you need to resend because you need to rebase, can you change the function name to `_getadmonitionlist`. Also it will be extremely great if you send a patch documenting the functions in the `releasenotes.py` file.

> releasenotes.py:475
> +        _('REV')),
> +    ('a', 'admonition', False, _('returns admonition and its title'), None)],
>      _('hg releasenotes [-r REV] [-c] FILE'))

I am not sure whether `-a` is the best choice of flag. Maybe we can have `-l` and `--list`.

Also the help can be improved to "list the available admonitions with their title".

> test-releasenotes-formatting.t:409
>    Invalid admonition 'fixes' present in changeset 0e7130d2705c
>    (did you mean fix?)
> +

The above lines were added in https://phab.mercurial-scm.org/D368 which is not yet pushed. So can you rebase this patch and resend so that it can be pushed independently.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D454

To: rishabhmadan96, #hg-reviewers, pulkit
Cc: pulkit, mercurial-devel


More information about the Mercurial-devel mailing list