comparison mercurial/hgweb/hgweb_mod.py @ 3499:e0db0b7934f2

hgweb: add heads to gitweb summary
author Brendan Cully <brendan@kublai.com>
date Tue, 24 Oct 2006 13:31:01 -0700
parents 8f02223662c8
children 881064004fd0
comparison
equal deleted inserted replaced
3498:776c317566b6 3499:e0db0b7934f2
525 tag = k, 525 tag = k,
526 node = hex(n), 526 node = hex(n),
527 date = t) 527 date = t)
528 parity += 1 528 parity += 1
529 529
530 def heads(**map):
531 parity = 0
532 count = 0
533
534 for node in self.repo.heads():
535 count += 1
536 if count > 10:
537 break;
538
539 ctx = self.repo.changectx(node)
540
541 yield {'parity': self.stripes(parity),
542 'branch': ctx.branch(),
543 'node': hex(node),
544 'date': ctx.date()}
545 parity += 1
546
530 def changelist(**map): 547 def changelist(**map):
531 parity = 0 548 parity = 0
532 cl = self.repo.changelog 549 cl = self.repo.changelog
533 l = [] # build a list in forward order for efficiency 550 l = [] # build a list in forward order for efficiency
534 for i in xrange(start, end): 551 for i in xrange(start, end):
558 owner = (self.repo.ui.config("ui", "username") or # preferred 575 owner = (self.repo.ui.config("ui", "username") or # preferred
559 self.repo.ui.config("web", "contact") or # deprecated 576 self.repo.ui.config("web", "contact") or # deprecated
560 self.repo.ui.config("web", "author", "unknown")), # also 577 self.repo.ui.config("web", "author", "unknown")), # also
561 lastchange = cl.read(cl.tip())[2], 578 lastchange = cl.read(cl.tip())[2],
562 tags = tagentries, 579 tags = tagentries,
580 heads = heads,
563 shortlog = changelist, 581 shortlog = changelist,
564 node = hex(cl.tip()), 582 node = hex(cl.tip()),
565 archives=self.archivelist("tip")) 583 archives=self.archivelist("tip"))
566 584
567 def filediff(self, fctx): 585 def filediff(self, fctx):