# HG changeset patch # User Steve Losh # Date 1252621749 14400 # Node ID 15afa852bf78ae77b1fe07d2a75539a0f56889b5 # Parent a1aca2ec2e5b02ec9f614fa24933493f1ba64be1 Add a {tags} keyword. diff -r a1aca2ec2e5b -r 15afa852bf78 prompt.py --- a/prompt.py Sat Aug 08 09:49:22 2009 -0400 +++ b/prompt.py Thu Sep 10 18:29:09 2009 -0400 @@ -123,6 +123,15 @@ except KeyError: return '' + def _tags(m): + g = m.groups() + out_g = (g[0],) + (g[-1],) + + sep = g[1][1:] if g[1] else ' ' + tags = repo[None].tags() + + return _with_groups(out_g, sep.join(tags)) if tags else '' + def _task(m): try: task = extensions.find('tasks').current(repo) @@ -205,6 +214,7 @@ 'root': _root, 'root\|basename': _basename, 'status': _status, + 'tags(\|[^}]*)?': _tags, 'task': _task, 'update': _update,