Mercurial > hg > mercurial-crew-with-dirclash
comparison 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 |
comparison
equal
deleted
inserted
replaced
3456:451ec905625b | 3457:fab28100ea88 |
---|---|
308 "shortdate": shortdate, | 308 "shortdate": shortdate, |
309 "stringify": stringify, | 309 "stringify": stringify, |
310 "strip": lambda x: x.strip(), | 310 "strip": lambda x: x.strip(), |
311 "urlescape": lambda x: urllib.quote(x), | 311 "urlescape": lambda x: urllib.quote(x), |
312 "user": lambda x: util.shortuser(x), | 312 "user": lambda x: util.shortuser(x), |
313 "stringescape": lambda x: x.encode('string_escape'), | |
313 } | 314 } |
314 | 315 |
315 def templatepath(name=None): | 316 def templatepath(name=None): |
316 '''return location of template file or directory (if no name). | 317 '''return location of template file or directory (if no name). |
317 returns None if not found.''' | 318 returns None if not found.''' |
462 | 463 |
463 def showtags(**args): | 464 def showtags(**args): |
464 for x in showlist('tag', self.repo.nodetags(changenode), **args): | 465 for x in showlist('tag', self.repo.nodetags(changenode), **args): |
465 yield x | 466 yield x |
466 | 467 |
468 def showextras(**args): | |
469 extras = changes[5].items() | |
470 extras.sort() | |
471 for key, value in extras: | |
472 args = args.copy() | |
473 args.update(dict(key=key, value=value)) | |
474 yield self.t('extra', **args) | |
475 | |
467 if self.ui.debugflag: | 476 if self.ui.debugflag: |
468 files = self.repo.status(log.parents(changenode)[0], changenode)[:3] | 477 files = self.repo.status(log.parents(changenode)[0], changenode)[:3] |
469 def showfiles(**args): | 478 def showfiles(**args): |
470 for x in showlist('file', files[0], **args): yield x | 479 for x in showlist('file', files[0], **args): yield x |
471 def showadds(**args): | 480 def showadds(**args): |
497 'manifest': showmanifest, | 506 'manifest': showmanifest, |
498 'node': hex(changenode), | 507 'node': hex(changenode), |
499 'parents': showparents, | 508 'parents': showparents, |
500 'rev': rev, | 509 'rev': rev, |
501 'tags': showtags, | 510 'tags': showtags, |
511 'extras': showextras, | |
502 } | 512 } |
503 props = props.copy() | 513 props = props.copy() |
504 props.update(defprops) | 514 props.update(defprops) |
505 | 515 |
506 try: | 516 try: |