# HG changeset patch # User Anton Shestakov <engored@ya.ru> # Date 1431691247 -28800 # Fri May 15 20:00:47 2015 +0800 # Node ID 3d82c517b9c50f32be717e7ef956a970c1df3605 # Parent 917b5a07188843f85f0235197afcdcf25c510ac8 paper: show branch/tags/bookmarks when viewing (issue3559) diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -130,6 +130,8 @@ parent=webutil.parents(fctx), child=webutil.children(fctx), rename=webutil.renamelink(fctx), + tags=webutil.nodetagsdict(web.repo, fctx.node()), + bookmarks=webutil.nodebookmarksdict(web.repo, fctx.node()), permissions=fctx.manifest().flags(f)) @webcommand('file') diff --git a/mercurial/templates/paper/filerevision.tmpl b/mercurial/templates/paper/filerevision.tmpl --- a/mercurial/templates/paper/filerevision.tmpl +++ b/mercurial/templates/paper/filerevision.tmpl @@ -36,7 +36,7 @@ <div class="main"> <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2> -<h3>view {file|escape} @ {rev}:{node|short}</h3> +<h3>view {file|escape} @ {rev}:{node|short} {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag}</h3> <form class="search" action="{url|urlescape}log"> {sessionvars%hiddenformentry} diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t --- a/tests/test-hgweb-commands.t +++ b/tests/test-hgweb-commands.t @@ -1295,7 +1295,7 @@ <div class="main"> <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> - <h3>view foo @ 1:a4f92ed23982</h3> + <h3>view foo @ 1:a4f92ed23982 </h3> <form class="search" action="/log"> @@ -1419,7 +1419,7 @@ <div class="main"> <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> - <h3>view foo @ 2:1d22e65f027e</h3> + <h3>view foo @ 2:1d22e65f027e <span class="branchname">stable</span> </h3> <form class="search" action="/log"> diff --git a/tests/test-highlight.t b/tests/test-highlight.t --- a/tests/test-highlight.t +++ b/tests/test-highlight.t @@ -105,7 +105,7 @@ <div class="main"> <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> - <h3>view primes.py @ 0:853dcd4de2a6</h3> + <h3>view primes.py @ 0:853dcd4de2a6 <span class="tag">tip</span> </h3> <form class="search" action="/log">