comparison mercurial/hgweb/webcommands.py @ 7612:069b29656401

web: use the correct filectx in filelog
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 09 Jan 2009 17:34:06 +0100
parents 5f162f61e479
children 4dd7b28003d2
comparison
equal deleted inserted replaced
7569:89207edf3973 7612:069b29656401
543 parity = paritygen(web.stripecount, offset=start-end) 543 parity = paritygen(web.stripecount, offset=start-end)
544 544
545 def entries(limit=0, **map): 545 def entries(limit=0, **map):
546 l = [] 546 l = []
547 547
548 repo = web.repo
548 for i in xrange(start, end): 549 for i in xrange(start, end):
549 ctx = fctx.filectx(i) 550 iterfctx = fctx.filectx(i)
550 551
551 l.insert(0, {"parity": parity.next(), 552 l.insert(0, {"parity": parity.next(),
552 "filerev": i, 553 "filerev": i,
553 "file": f, 554 "file": f,
554 "node": hex(ctx.node()), 555 "node": hex(iterfctx.node()),
555 "author": ctx.user(), 556 "author": iterfctx.user(),
556 "date": ctx.date(), 557 "date": iterfctx.date(),
557 "rename": webutil.renamelink(fctx), 558 "rename": webutil.renamelink(iterfctx),
558 "parent": webutil.siblings(fctx.parents()), 559 "parent": webutil.siblings(iterfctx.parents()),
559 "child": webutil.siblings(fctx.children()), 560 "child": webutil.siblings(iterfctx.children()),
560 "desc": ctx.description(), 561 "desc": iterfctx.description(),
561 "tags": webutil.nodetagsdict(web.repo, ctx.node()), 562 "tags": webutil.nodetagsdict(repo, iterfctx.node()),
562 "branch": webutil.nodebranchnodefault(ctx), 563 "branch": webutil.nodebranchnodefault(iterfctx),
563 "inbranch": webutil.nodeinbranch(web.repo, ctx), 564 "inbranch": webutil.nodeinbranch(repo, iterfctx),
564 "branches": webutil.nodebranchdict(web.repo, ctx)}) 565 "branches": webutil.nodebranchdict(repo, iterfctx)})
565 566
566 if limit > 0: 567 if limit > 0:
567 l = l[:limit] 568 l = l[:limit]
568 569
569 for e in l: 570 for e in l: