# HG changeset patch # User Kevin Bullock # Date 1359135834 21600 # Node ID 886936ecc21bed5e9bc1a244b22f4b203d3c3ace # Parent 010d6d3fcfee422f4dd458321c6f540954548d7e 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. diff -r 010d6d3fcfee -r 886936ecc21b mercurial/hgweb/webcommands.py --- 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): diff -r 010d6d3fcfee -r 886936ecc21b tests/test-hgweb-commands.t --- a/tests/test-hgweb-commands.t Fri Jan 25 14:50:18 2013 -0600 +++ b/tests/test-hgweb-commands.t Fri Jan 25 11:43:54 2013 -0600 @@ -1370,4 +1370,20 @@ $ cat errors.log +issue3774 + + $ hg phase -fs 4 + $ hg bookmark -r4 secret + $ cat > hgweb.cgi < from mercurial import demandimport; demandimport.enable() + > from mercurial.hgweb import hgweb + > from mercurial.hgweb import wsgicgi + > app = hgweb('.', 'test') + > wsgicgi.launch(app) + > HGWEB + $ . "$TESTDIR/cgienv" + $ PATH_INFO=/bookmarks; export PATH_INFO + $ QUERY_STRING='style=raw' + $ python hgweb.cgi + $ cd ..