Mercurial > hg
changeset 1908:be71c04d62c0
print tags in compact template.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 27 Feb 2006 13:25:40 -0800 |
parents | 7718885070b1 |
children | 37b9f80a5fbb |
files | mercurial/commands.py templates/map-log.compact |
diffstat | 2 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Feb 27 13:18:57 2006 -0800 +++ b/mercurial/commands.py Mon Feb 27 13:25:40 2006 -0800 @@ -378,12 +378,12 @@ startname = 'start_' + names if startname in self.t: yield self.t(startname, **args) - def one(v): + def one(v, tag=name): try: vargs.update(v) except ValueError: vargs.update([(name, v)]) - return self.t(name, **vargs) + return self.t(tag, **vargs) lastname = 'last_' + name if lastname in self.t: last = values.pop() @@ -392,8 +392,7 @@ for v in values: yield one(v) if last is not None: - name = lastname - yield one(last) + yield one(last, tag=lastname) endname = 'end_' + names if endname in self.t: yield self.t(endname, **args)
--- a/templates/map-log.compact Mon Feb 27 13:18:57 2006 -0800 +++ b/templates/map-log.compact Mon Feb 27 13:25:40 2006 -0800 @@ -1,4 +1,7 @@ -template = '{rev}{parents} {node|short} {date|isodate} {author|user}\n {desc|firstline|strip}\n\n' +template = '{rev}{tags}{parents} {node|short} {date|isodate} {author|user}\n {desc|firstline|strip}\n\n' +start_tags = '[' +tag = '{tag},' +last_tag = '{tag}]' start_parents = ':' parent = '{rev},' last_parent = '{rev}'