# HG changeset patch # User Steve Losh # Date 1327682573 18000 # Node ID 0649e77b06d03c2edecbf6ffc3612099c0f88436 # Parent 97c27cccb45897f740c4c9a9f221d7b22d888aea# Parent 91bec91479bc908fa267a91238c6ad5a01ea0700 Merge. diff -r 91bec91479bc -r 0649e77b06d0 docs/wiki/documentation/keywords/index.mdown --- a/docs/wiki/documentation/keywords/index.mdown Fri Jan 20 10:17:56 2012 -0800 +++ b/docs/wiki/documentation/keywords/index.mdown Fri Jan 27 11:42:53 2012 -0500 @@ -157,6 +157,9 @@ ##tags## : Display the tags of the current parent, separated by a space. + |quiet + Display the tags of the current parent, excluding the tag "tip". + |SEP : Display the tags of the current parent, separated by `SEP`. diff -r 91bec91479bc -r 0649e77b06d0 prompt.py --- a/prompt.py Fri Jan 20 10:17:56 2012 -0800 +++ b/prompt.py Fri Jan 27 11:42:53 2012 -0500 @@ -304,9 +304,13 @@ def _tags(m): g = m.groups() - sep = g[1][1:] if g[1] else ' ' + sep = g[2][1:] if g[2] else ' ' tags = repo[None].tags() + quiet = _get_filter('quiet', g) + if quiet: + tags = filter(lambda tag: tag != 'tip', tags) + return _with_groups(g, sep.join(tags)) if tags else '' def _task(m): @@ -380,7 +384,10 @@ '(\|modified)' '|(\|unknown)' ')*': _status, - 'tags(\|[^%s]*?)?' % brackets[-1]: _tags, + 'tags(?:' + + '(\|quiet)' + + '|(\|[^%s]*?)' % brackets[-1] + + ')*': _tags, 'task': _task, 'tip(?:' '(\|node)' @@ -593,6 +600,9 @@ tags Display the tags of the current parent, separated by a space. + |quiet + Display the tags of the current parent, excluding the tag "tip". + |SEP Display the tags of the current parent, separated by `SEP`.