# HG changeset patch # User Vadim Gelfer # Date 2006-02-27 21:25:40 # Node ID be71c04d62c0e5c74548ce4fef0f56a306a2b1e2 # Parent 7718885070b1dbf25c51bf94cd080df04980ead3 print tags in compact template. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -378,12 +378,12 @@ class changeset_templater(object): 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 @@ class changeset_templater(object): 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) diff --git a/templates/map-log.compact b/templates/map-log.compact --- a/templates/map-log.compact +++ b/templates/map-log.compact @@ -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}'