Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/templater.py @ 3457:fab28100ea88
Added extra changeset info to templater and map-cmdline.default.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 18 Oct 2006 18:09:32 +0200 |
parents | 451ec905625b |
children | 231393b7316f |
line wrap: on
line diff
--- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -310,6 +310,7 @@ common_filters = { "strip": lambda x: x.strip(), "urlescape": lambda x: urllib.quote(x), "user": lambda x: util.shortuser(x), + "stringescape": lambda x: x.encode('string_escape'), } def templatepath(name=None): @@ -464,6 +465,14 @@ class changeset_templater(object): for x in showlist('tag', self.repo.nodetags(changenode), **args): yield x + def showextras(**args): + extras = changes[5].items() + extras.sort() + for key, value in extras: + args = args.copy() + args.update(dict(key=key, value=value)) + yield self.t('extra', **args) + if self.ui.debugflag: files = self.repo.status(log.parents(changenode)[0], changenode)[:3] def showfiles(**args): @@ -499,6 +508,7 @@ class changeset_templater(object): 'parents': showparents, 'rev': rev, 'tags': showtags, + 'extras': showextras, } props = props.copy() props.update(defprops)