##// END OF EJS Templates
hgweb: use introrev() for finding parents (issue4506)...
hgweb: use introrev() for finding parents (issue4506) The issue is titled "filtered revision 'XXX' (not in 'served' subset)" and that is the error message you sometimes get when trying to look at a file (/file or /annotate) in hgweb. For example: http://hg.intevation.org/mercurial/crew/file/90cf454edd70/mercurial/cmdutil.py This happens when a parent revision for a file is hidden, thus it is not 'served' and isn't accessible in hgweb by default. When hgweb tries to access such changeset, it produces the error and HTTP status code 404. Another detail is that the parents() function, that is used in multiple places in hgweb, sometimes returned changesets that were obsoleted by the current changeset for the file. For example, when using rebase with evolve and rebasing a divergent changeset that introduces a file on top of current branch. Or grafting a change and making the new grafted changeset obsolete the source (shown in the test case). The result is the same - the obsoleted changeset was mistakingly returned from parents(), even though it's not a parent and the only link to the new changeset is an obsoletion marker (and rebase/graft metadata? not sure it matters). The problem is fixed by using introrev() instead of linkrev() for finding parents. This prevents parents() function from returning unrelated obsolete changesets. The test case prepares a separate repo because (afaict) all other test cases never reuse file names, so there are no files that were changed in multiple changesets. So no previously available files have obsolete changesets in their history.

File last commit:

r18526:9409aeaa stable
r24136:46d6cdfc default
Show More
bookmarks.tmpl
33 lines | 1.2 KiB | application/x-cheetah | CheetahLexer
Yuya Nishihara
hgweb: add separate bookmarks listing to gitweb theme (based on 38c9837b1f75)
r13864 {header}
<title>{repo|escape}: Bookmarks</title>
<link rel="alternate" type="application/atom+xml"
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 href="{url|urlescape}atom-bookmarks" title="Atom feed for {repo|escape}"/>
Yuya Nishihara
hgweb: add separate bookmarks listing to gitweb theme (based on 38c9837b1f75)
r13864 <link rel="alternate" type="application/rss+xml"
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 href="{url|urlescape}rss-bookmarks" title="RSS feed for {repo|escape}"/>
Yuya Nishihara
hgweb: add separate bookmarks listing to gitweb theme (based on 38c9837b1f75)
r13864 </head>
<body>
<div class="page_header">
Angel Ezquerra <angel.ezquerra at gmail.com>
hgweb: add a "URL breadcrumb" to the index and repository pages...
r18258 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
<a href="/">Mercurial</a> {pathdef%breadcrumb} / bookmarks
Yuya Nishihara
hgweb: add separate bookmarks listing to gitweb theme (based on 38c9837b1f75)
r13864 </div>
<div class="page_nav">
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a> |
<a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a> |
<a href="{url|urlescape}log{sessionvars%urlparameter}">changelog</a> |
<a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a> |
<a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a> |
Yuya Nishihara
hgweb: add separate bookmarks listing to gitweb theme (based on 38c9837b1f75)
r13864 bookmarks |
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a> |
<a href="{url|urlescape}file/{node|short}{sessionvars%urlparameter}">files</a> |
<a href="{url|urlescape}help{sessionvars%urlparameter}">help</a>
Yuya Nishihara
hgweb: add separate bookmarks listing to gitweb theme (based on 38c9837b1f75)
r13864 <br/>
</div>
<div class="title">&nbsp;</div>
<table cellspacing="0">
{entries%bookmarkentry}
</table>
{footer}