mercurial/hgweb/webcommands.py
changeset 28710 ca0c0ca30c62
parent 28212 d4419c01532b
child 28711 06ae7a6daad0
--- a/mercurial/hgweb/webcommands.py	Thu Mar 31 18:09:09 2016 +0800
+++ b/mercurial/hgweb/webcommands.py	Thu Mar 31 14:23:27 2016 +0800
@@ -606,13 +606,13 @@
     The ``bookmarks`` template is rendered.
     """
     i = [b for b in web.repo._bookmarks.items() if b[1] in web.repo]
+    i = sorted(i)
     parity = paritygen(web.stripecount)
 
     def entries(latestonly, **map):
+        t = i
         if latestonly:
-            t = [min(i)]
-        else:
-            t = sorted(i)
+            t = i[:1]
         for k, n in t:
             yield {"parity": parity.next(),
                    "bookmark": k,