comparison mercurial/hgweb/webcommands.py @ 6564:ccc2481e3954

webcommands: pass full author to annotate, fix templates (issue 1054)
author Patrick Mezard <pmezard@gmail.com>
date Wed, 23 Apr 2008 22:45:53 +0200
parents 101526031d06
children a51093361e1c
comparison
equal deleted inserted replaced
6563:3b6f18851d87 6564:ccc2481e3954
462 '(binary:%s)' % mt)]) 462 '(binary:%s)' % mt)])
463 else: 463 else:
464 lines = enumerate(fctx.annotate(follow=True, linenumber=True)) 464 lines = enumerate(fctx.annotate(follow=True, linenumber=True))
465 for lineno, ((f, targetline), l) in lines: 465 for lineno, ((f, targetline), l) in lines:
466 fnode = f.filenode() 466 fnode = f.filenode()
467 name = web.repo.ui.shortuser(f.user())
468 467
469 if last != fnode: 468 if last != fnode:
470 last = fnode 469 last = fnode
471 470
472 yield {"parity": parity.next(), 471 yield {"parity": parity.next(),
473 "node": hex(f.node()), 472 "node": hex(f.node()),
474 "rev": f.rev(), 473 "rev": f.rev(),
475 "author": name, 474 "author": f.user(),
476 "file": f.path(), 475 "file": f.path(),
477 "targetline": targetline, 476 "targetline": targetline,
478 "line": l, 477 "line": l,
479 "lineid": "l%d" % (lineno + 1), 478 "lineid": "l%d" % (lineno + 1),
480 "linenumber": "% 6d" % (lineno + 1)} 479 "linenumber": "% 6d" % (lineno + 1)}