mercurial/hgweb/webcommands.py
branchstable
changeset 18563 6d098adc5a46
parent 18524 66ae2ded0968
child 18581 3490c91a1fcb
equal deleted inserted replaced
18561:7365d031d457 18563:6d098adc5a46
   495                        node=hex(n),
   495                        node=hex(n),
   496                        date=web.repo[n].date())
   496                        date=web.repo[n].date())
   497 
   497 
   498     def bookmarks(**map):
   498     def bookmarks(**map):
   499         parity = paritygen(web.stripecount)
   499         parity = paritygen(web.stripecount)
   500         b = web.repo._bookmarks.items()
   500         marks = [b for b in web.repo._bookmarks.items() if b[1] in web.repo]
   501         for k, n in sorted(b)[:10]:  # limit to 10 bookmarks
   501         for k, n in sorted(marks)[:10]:  # limit to 10 bookmarks
   502             yield {'parity': parity.next(),
   502             yield {'parity': parity.next(),
   503                    'bookmark': k,
   503                    'bookmark': k,
   504                    'date': web.repo[n].date(),
   504                    'date': web.repo[n].date(),
   505                    'node': hex(n)}
   505                    'node': hex(n)}
   506 
   506 
   516                    'date': web.repo[n].date()}
   516                    'date': web.repo[n].date()}
   517 
   517 
   518     def changelist(**map):
   518     def changelist(**map):
   519         parity = paritygen(web.stripecount, offset=start - end)
   519         parity = paritygen(web.stripecount, offset=start - end)
   520         l = [] # build a list in forward order for efficiency
   520         l = [] # build a list in forward order for efficiency
   521         for i in xrange(start, end):
   521         revs = []
       
   522         if start < end:
       
   523             revs = web.repo.changelog.revs(start, end - 1)
       
   524         for i in revs:
   522             ctx = web.repo[i]
   525             ctx = web.repo[i]
   523             n = ctx.node()
   526             n = ctx.node()
   524             hn = hex(n)
   527             hn = hex(n)
   525 
   528 
   526             l.append(tmpl(
   529             l.append(tmpl(