Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/templater.py @ 2956:6dddcba7596a
merge.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 18 Aug 2006 21:17:28 -0700 |
parents | 3d6efcbbd1c9 |
children | e18c3d08528d |
comparison
equal
deleted
inserted
replaced
2955:9d1c3529ebbc | 2956:6dddcba7596a |
---|---|
239 def nl2br(text): | 239 def nl2br(text): |
240 '''replace raw newlines with xhtml line breaks.''' | 240 '''replace raw newlines with xhtml line breaks.''' |
241 return text.replace('\n', '<br/>\n') | 241 return text.replace('\n', '<br/>\n') |
242 | 242 |
243 def obfuscate(text): | 243 def obfuscate(text): |
244 text = unicode(text, 'utf-8', 'replace') | |
244 return ''.join(['&#%d;' % ord(c) for c in text]) | 245 return ''.join(['&#%d;' % ord(c) for c in text]) |
245 | 246 |
246 def domain(author): | 247 def domain(author): |
247 '''get domain of author, or empty string if none.''' | 248 '''get domain of author, or empty string if none.''' |
248 f = author.find('@') | 249 f = author.find('@') |
456 def showtags(**args): | 457 def showtags(**args): |
457 for x in showlist('tag', self.repo.nodetags(changenode), **args): | 458 for x in showlist('tag', self.repo.nodetags(changenode), **args): |
458 yield x | 459 yield x |
459 | 460 |
460 if self.ui.debugflag: | 461 if self.ui.debugflag: |
461 files = self.repo.changes(log.parents(changenode)[0], changenode) | 462 files = self.repo.status(log.parents(changenode)[0], changenode)[:3] |
462 def showfiles(**args): | 463 def showfiles(**args): |
463 for x in showlist('file', files[0], **args): yield x | 464 for x in showlist('file', files[0], **args): yield x |
464 def showadds(**args): | 465 def showadds(**args): |
465 for x in showlist('file_add', files[1], **args): yield x | 466 for x in showlist('file_add', files[1], **args): yield x |
466 def showdels(**args): | 467 def showdels(**args): |