# HG changeset patch # User Dale Wijnand # Date 1327445785 -3600 # Node ID f9395e8dcb7b489ae976042bc93fd4298d689370 # Parent c4095c3519d61f97f78fd767c1f81c6b4f06df80 Add a quiet filter to the tags keyword, to exclude tip from the shown tags. diff -r c4095c3519d6 -r f9395e8dcb7b prompt.py --- a/prompt.py Wed Mar 23 15:42:04 2011 -0400 +++ b/prompt.py Tue Jan 24 23:56:25 2012 +0100 @@ -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)'