Patchwork [1,of,4] templatekw: add hidden state

login
register
mail settings
Submitter Romain DEP.
Date Jan. 6, 2015, 9:47 a.m.
Message ID <48b4b6810d3130975cb6.1420537672@ultas>
Download mbox | patch
Permalink /patch/7330/
State Rejected
Headers show

Comments

Romain DEP. - Jan. 6, 2015, 9:47 a.m.
# HG changeset patch
# User Romain DEP. <rom1dep@gmail.com>
# Date 1420412273 -3600
#      Sun Jan 04 23:57:53 2015 +0100
# Node ID 48b4b6810d3130975cb66d2034ea9a8001551a9f
# Parent  16e29a4607250097d98821758e9455453881efb5
templatekw: add hidden state
Pierre-Yves David - Jan. 9, 2015, 3:33 a.m.
On 01/06/2015 01:47 AM, Romain DEP. wrote:
> # HG changeset patch
> # User Romain DEP. <rom1dep@gmail.com>
> # Date 1420412273 -3600
> #      Sun Jan 04 23:57:53 2015 +0100
> # Node ID 48b4b6810d3130975cb66d2034ea9a8001551a9f
> # Parent  16e29a4607250097d98821758e9455453881efb5
> templatekw: add hidden state
>
> diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
> --- a/mercurial/templatekw.py
> +++ b/mercurial/templatekw.py
> @@ -354,6 +354,10 @@
>       """:phaseidx: Integer. The changeset phase index."""
>       return ctx.phase()
>
> +def showhidden(repo, ctx, templ, **args):
> +    """:hidden: String. Return the changeset hidden state."""
> +    return ctx.hiddenstr()

  I'm not sure why you are patchbombing this while there is no 
ctx.hiddenstr() methode in core.

Dropping the series.

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -354,6 +354,10 @@ 
     """:phaseidx: Integer. The changeset phase index."""
     return ctx.phase()
 
+def showhidden(repo, ctx, templ, **args):
+    """:hidden: String. Return the changeset hidden state."""
+    return ctx.hiddenstr()
+
 def showrev(repo, ctx, templ, **args):
     """:rev: Integer. The repository-local changeset revision number."""
     return ctx.rev()
@@ -418,6 +422,7 @@ 
     'p2node': showp2node,
     'phase': showphase,
     'phaseidx': showphaseidx,
+    'hidden': showhidden,
     'rev': showrev,
     'subrepos': showsubrepos,
 }