diff -r 3290e24bb3f0 -r e7bf09acd410 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Sun May 13 16:39:40 2012 +0200 +++ b/mercurial/hgweb/webcommands.py Sun May 13 14:04:04 2012 +0200 @@ -794,7 +794,11 @@ desc = cgi.escape(templatefilters.nonempty(desc)) user = cgi.escape(templatefilters.person(ctx.user())) branch = ctx.branch() - branch = branch, web.repo.branchtags().get(branch) == ctx.node() + try: + branchnode = web.repo.branchtip(branch) + except error.RepoLookupError: + branchnode = None + branch = branch, branchnode == ctx.node() data.append((node, vtx, edges, desc, user, age, branch, ctx.tags(), ctx.bookmarks()))