[PATCH 6 of 9 RFC] templatekw: add a function to help generate a keyword for a marker
Sean Farley
sean.michael.farley at gmail.com
Sun Mar 30 18:09:04 CDT 2014
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1396218756 18000
# Sun Mar 30 17:32:36 2014 -0500
# Node ID bd0a4d48b4ec44de53ec8710f077ddf1850900a4
# Parent edf2cf8e1b4ba5796c8cec04956b0e080c089862
templatekw: add a function to help generate a keyword for a marker
diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -347,10 +347,18 @@ def showrev(repo, ctx, templ, **args):
def showtags(**args):
""":tags: List of strings. Any tags associated with the changeset."""
return showlist('tag', args['ctx'].tags(), **args)
+def showmarkers(namespace, **args):
+ """:tags: List of strings. Any markers in the namespace `namespace` associated
+ with the changeset.
+ """
+ return showlist(namespace,
+ args['repo'].nodemarkers(args['ctx'].node(), namespace),
+ **args)
+
# keywords are callables like:
# fn(repo, ctx, templ, cache, revcache, **args)
# with:
# repo - current repository instance
# ctx - the changectx being displayed
More information about the Mercurial-devel
mailing list