Patchwork [7,of,7,V2] templatekw: remove unneeded showtags

login
register
mail settings
Submitter Sean Farley
Date Dec. 18, 2014, 9:10 p.m.
Message ID <22254dcbdf93b47f7972.1418937051@laptop.local>
Download mbox | patch
Permalink /patch/7179/
State Accepted
Headers show

Comments

Sean Farley - Dec. 18, 2014, 9:10 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1418665202 28800
#      Mon Dec 15 09:40:02 2014 -0800
# Node ID 22254dcbdf93b47f79723267b92252becf9e3ce0
# Parent  61be8fb2ece5b5a7f0ca6b5ecaa4c274c7e0190e
templatekw: remove unneeded showtags

Now that we have the machinery of namespaces in-place, we use that instead of
hand-rolling our own template function.

Note, this can only be used for tags because both branches and bookmarks have
special case logic for 'default' and the current bookmark (which is something
outside the namespace api for now).
Pierre-Yves David - Dec. 18, 2014, 9:22 p.m.
On 12/18/2014 01:10 PM, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean.michael.farley@gmail.com>
> # Date 1418665202 28800
> #      Mon Dec 15 09:40:02 2014 -0800
> # Node ID 22254dcbdf93b47f79723267b92252becf9e3ce0
> # Parent  61be8fb2ece5b5a7f0ca6b5ecaa4c274c7e0190e
> templatekw: remove unneeded showtags

pushed to the clowncopter, thanks.

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -372,14 +372,10 @@  def showsubrepos(**args):
     for sub in psubstate:
         if sub not in substate:
             subrepos.append(sub) # removed in ctx
     return showlist('subrepo', sorted(subrepos), **args)
 
-def showtags(**args):
-    """:tags: List of strings. Any tags associated with the changeset."""
-    return showlist('tag', args['ctx'].tags(), **args)
-
 def shownames(namespace, **args):
     """helper method to generate a template keyword for a namespace"""
     ctx = args['ctx']
     repo = ctx._repo
     names = repo.names.names(repo, namespace, ctx.node())
@@ -422,11 +418,10 @@  keywords = {
     'p2node': showp2node,
     'phase': showphase,
     'phaseidx': showphaseidx,
     'rev': showrev,
     'subrepos': showsubrepos,
-    'tags': showtags,
 }
 
 def _showparents(**args):
     """:parents: List of strings. The parents of the changeset in "rev:node"
     format. If the changeset has only one "natural" parent (the predecessor