diff mercurial/hgweb/webcommands.py @ 18478:886936ecc21b stable

hgweb: don't attempt to show hidden bookmarks (issue3774) localrepository._bookmarks is unfiltered, but hgweb gets a filtered repo. This fixes the resulting traceback on the 'bookmarks' page.
author Kevin Bullock <kbullock@ringworld.org>
date Fri, 25 Jan 2013 11:43:54 -0600
parents 010d6d3fcfee
children a58d8936647a
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Fri Jan 25 14:50:18 2013 -0600
+++ b/mercurial/hgweb/webcommands.py	Fri Jan 25 11:43:54 2013 -0600
@@ -424,7 +424,7 @@
                 latestentry=lambda **x: entries(True, True, **x))
 
 def bookmarks(web, req, tmpl):
-    i = web.repo._bookmarks.items()
+    i = [b for b in web.repo._bookmarks.items() if b[1] in web.repo]
     parity = paritygen(web.stripecount)
 
     def entries(latestonly, **map):