mercurial/hgweb/webcommands.py
changeset 28710 ca0c0ca30c62
parent 28212 d4419c01532b
child 28711 06ae7a6daad0
equal deleted inserted replaced
28709:94494031f659 28710:ca0c0ca30c62
   604     No arguments are accepted.
   604     No arguments are accepted.
   605 
   605 
   606     The ``bookmarks`` template is rendered.
   606     The ``bookmarks`` template is rendered.
   607     """
   607     """
   608     i = [b for b in web.repo._bookmarks.items() if b[1] in web.repo]
   608     i = [b for b in web.repo._bookmarks.items() if b[1] in web.repo]
       
   609     i = sorted(i)
   609     parity = paritygen(web.stripecount)
   610     parity = paritygen(web.stripecount)
   610 
   611 
   611     def entries(latestonly, **map):
   612     def entries(latestonly, **map):
       
   613         t = i
   612         if latestonly:
   614         if latestonly:
   613             t = [min(i)]
   615             t = i[:1]
   614         else:
       
   615             t = sorted(i)
       
   616         for k, n in t:
   616         for k, n in t:
   617             yield {"parity": parity.next(),
   617             yield {"parity": parity.next(),
   618                    "bookmark": k,
   618                    "bookmark": k,
   619                    "date": web.repo[n].date(),
   619                    "date": web.repo[n].date(),
   620                    "node": hex(n)}
   620                    "node": hex(n)}