comparison mercurial/hgweb/hgweb_mod.py @ 3175:fc379b91f602

hgweb: make annotate line revisions point to annotation for that rev
author Brendan Cully <brendan@kublai.com>
date Wed, 27 Sep 2006 09:10:31 -0700
parents 3466bd7b9754
children 8683c7a637ad
comparison
equal deleted inserted replaced
3174:833f2d1fc508 3175:fc379b91f602
396 fl = fctx.filelog() 396 fl = fctx.filelog()
397 397
398 def annotate(**map): 398 def annotate(**map):
399 parity = 0 399 parity = 0
400 last = None 400 last = None
401 for f, l in fctx.annotate(): 401 for f, l in fctx.annotate(follow=True):
402 cnode = f.node() 402 fnode = f.filenode()
403 name = self.repo.ui.shortuser(f.user()) 403 name = self.repo.ui.shortuser(f.user())
404 404
405 if last != cnode: 405 if last != fnode:
406 parity = 1 - parity 406 parity = 1 - parity
407 last = cnode 407 last = fnode
408 408
409 yield {"parity": parity, 409 yield {"parity": parity,
410 "node": hex(cnode), 410 "node": hex(fnode),
411 "rev": f.rev(), 411 "rev": f.rev(),
412 "author": name, 412 "author": name,
413 "file": f.path(), 413 "file": f.path(),
414 "line": l} 414 "line": l}
415 415