# HG changeset patch # User Matt Mackall # Date 1360183409 21600 # Node ID 2fefd1170bf269e26bb304553009f38e0117c342 # Parent 37010a55922aa3a81f339012dc7c10d0e062d68e# Parent 6d098adc5a46d2f395af0fb0419db145f57f956d merge with stable diff -r 37010a55922a -r 2fefd1170bf2 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Wed Feb 06 13:22:01 2013 +0100 +++ b/mercurial/hgweb/webcommands.py Wed Feb 06 14:43:29 2013 -0600 @@ -497,8 +497,8 @@ def bookmarks(**map): parity = paritygen(web.stripecount) - b = web.repo._bookmarks.items() - for k, n in sorted(b)[:10]: # limit to 10 bookmarks + marks = [b for b in web.repo._bookmarks.items() if b[1] in web.repo] + for k, n in sorted(marks)[:10]: # limit to 10 bookmarks yield {'parity': parity.next(), 'bookmark': k, 'date': web.repo[n].date(), @@ -518,7 +518,10 @@ def changelist(**map): parity = paritygen(web.stripecount, offset=start - end) l = [] # build a list in forward order for efficiency - for i in xrange(start, end): + revs = [] + if start < end: + revs = web.repo.changelog.revs(start, end - 1) + for i in revs: ctx = web.repo[i] n = ctx.node() hn = hex(n) diff -r 37010a55922a -r 2fefd1170bf2 tests/test-hgweb-commands.t --- a/tests/test-hgweb-commands.t Wed Feb 06 13:22:01 2013 +0100 +++ b/tests/test-hgweb-commands.t Wed Feb 06 14:43:29 2013 -0600 @@ -1399,6 +1399,14 @@ $ grep Status search Status: 200 Script output follows\r (esc) +summary works with filtering (issue3810) + + $ PATH_INFO=/summary; export PATH_INFO + $ QUERY_STRING='style=monoblue'; export QUERY_STRING + $ python hgweb.cgi > summary.out + $ grep "^Status" summary.out + Status: 200 Script output follows\r (esc) + proper status for filtered revision