changeset 25134:339e3cc073ac

paper: show branch/tags/bookmarks when diffing (issue3559)
author Anton Shestakov <engored@ya.ru>
date Fri, 15 May 2015 20:02:41 +0800
parents 3d82c517b9c5
children 3b689001e7c6
files mercurial/hgweb/webcommands.py mercurial/templates/paper/filediff.tmpl tests/test-hgweb-diffs.t tests/test-hgweb-removed.t
diffstat 4 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Fri May 15 20:00:47 2015 +0800
+++ b/mercurial/hgweb/webcommands.py	Fri May 15 20:02:41 2015 +0800
@@ -811,6 +811,8 @@
                 branch=webutil.nodebranchnodefault(ctx),
                 parent=webutil.parents(ctx),
                 child=webutil.children(ctx),
+                tags=webutil.nodetagsdict(web.repo, n),
+                bookmarks=webutil.nodebookmarksdict(web.repo, n),
                 diff=diffs)
 
 diff = webcommand('diff')(filediff)
--- a/mercurial/templates/paper/filediff.tmpl	Fri May 15 20:00:47 2015 +0800
+++ b/mercurial/templates/paper/filediff.tmpl	Fri May 15 20:02:41 2015 +0800
@@ -36,7 +36,7 @@
 
 <div class="main">
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
-<h3>diff {file|escape} @ {rev}:{node|short}</h3>
+<h3>diff {file|escape} @ {rev}:{node|short} {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag}</h3>
 
 <form class="search" action="{url|urlescape}log">
 <p>{sessionvars%hiddenformentry}</p>
--- a/tests/test-hgweb-diffs.t	Fri May 15 20:00:47 2015 +0800
+++ b/tests/test-hgweb-diffs.t	Fri May 15 20:02:41 2015 +0800
@@ -249,7 +249,7 @@
   
   <div class="main">
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
-  <h3>diff b @ 1:559edbd9ed20</h3>
+  <h3>diff b @ 1:559edbd9ed20 <span class="tag">tip</span> </h3>
   
   <form class="search" action="/log">
   <p></p>
@@ -525,7 +525,7 @@
   
   <div class="main">
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
-  <h3>diff a @ 1:559edbd9ed20</h3>
+  <h3>diff a @ 1:559edbd9ed20 <span class="tag">tip</span> </h3>
   
   <form class="search" action="/log">
   <p></p>
--- a/tests/test-hgweb-removed.t	Fri May 15 20:00:47 2015 +0800
+++ b/tests/test-hgweb-removed.t	Fri May 15 20:02:41 2015 +0800
@@ -185,7 +185,7 @@
   
   <div class="main">
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
-  <h3>diff a @ 1:c78f6c5cbea9</h3>
+  <h3>diff a @ 1:c78f6c5cbea9 <span class="tag">tip</span> </h3>
   
   <form class="search" action="/log">
   <p></p>