[PATCH 1 of 7] narrow: drop redundant templatekw/revset names from help text
Gregory Szorc
gregory.szorc at gmail.com
Mon Feb 26 20:06:22 UTC 2018
On Mon, Feb 26, 2018 at 6:29 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1519533771 -32400
> # Sun Feb 25 13:42:51 2018 +0900
> # Node ID b3622121e31c172c91ccf35fb738a85269ad7125
> # Parent 93228b2a1fc0a0c48ea138fb88bc719d5222c0c8
> narrow: drop redundant templatekw/revset names from help text
>
Queued this series. I like the new, safer mechanism for declaring template
keywords!
>
> ":<name>:" is automatically added by the registrar.
>
> diff --git a/hgext/narrow/narrowtemplates.py b/hgext/narrow/
> narrowtemplates.py
> --- a/hgext/narrow/narrowtemplates.py
> +++ b/hgext/narrow/narrowtemplates.py
> @@ -24,16 +24,15 @@ def _isellipsis(repo, rev):
>
> @templatekeyword('ellipsis')
> def ellipsis(repo, ctx, templ, **args):
> - """:ellipsis: String. 'ellipsis' if the change is an ellipsis node,
> - else ''."""
> + """String. 'ellipsis' if the change is an ellipsis node, else ''."""
> if _isellipsis(repo, ctx.rev()):
> return 'ellipsis'
> return ''
>
> @templatekeyword('outsidenarrow')
> def outsidenarrow(repo, ctx, templ, **args):
> - """:outsidenarrow: String. 'outsidenarrow' if the change affects no
> - tracked files, else ''."""
> + """String. 'outsidenarrow' if the change affects no tracked files,
> + else ''."""
> if util.safehasattr(repo, 'narrowmatch'):
> m = repo.narrowmatch()
> if not any(m(f) for f in ctx.files()):
> @@ -42,7 +41,5 @@ def outsidenarrow(repo, ctx, templ, **ar
>
> @revsetpredicate('ellipsis')
> def ellipsisrevset(repo, subset, x):
> - """``ellipsis()``
> - Changesets that are ellipsis nodes.
> - """
> + """Changesets that are ellipsis nodes."""
> return subset.filter(lambda r: _isellipsis(repo, r))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20180226/53ae8a53/attachment-0002.html>
More information about the Mercurial-devel
mailing list