changeset 26598:264e88901c44

monoblue: add a link to the latest file revision For reference, this was added to paper/coal in bb00a159e594 and to gitweb in b3b57ecbda50.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 12 Oct 2015 15:20:04 +0800
parents d58721d684cb
children bdd7d9c7e626
files mercurial/templates/monoblue/fileannotate.tmpl mercurial/templates/monoblue/filecomparison.tmpl mercurial/templates/monoblue/filediff.tmpl mercurial/templates/monoblue/filerevision.tmpl tests/test-hgweb-symrev.t
diffstat 5 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templates/monoblue/fileannotate.tmpl	Fri Oct 09 15:44:00 2015 -0700
+++ b/mercurial/templates/monoblue/fileannotate.tmpl	Mon Oct 12 15:20:04 2015 +0800
@@ -32,6 +32,7 @@
 
     <ul class="submenu">
         <li><a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+        <li><a href="{url|urlescape}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
         <li><a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
         <li class="current">annotate</li>
         <li><a href="{url|urlescape}diff/{symrev}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
--- a/mercurial/templates/monoblue/filecomparison.tmpl	Fri Oct 09 15:44:00 2015 -0700
+++ b/mercurial/templates/monoblue/filecomparison.tmpl	Mon Oct 12 15:20:04 2015 +0800
@@ -32,6 +32,7 @@
 
     <ul class="submenu">
         <li><a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+        <li><a href="{url|urlescape}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
         <li><a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
         <li><a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
         <li><a href="{url|urlescape}diff/{symrev}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
--- a/mercurial/templates/monoblue/filediff.tmpl	Fri Oct 09 15:44:00 2015 -0700
+++ b/mercurial/templates/monoblue/filediff.tmpl	Mon Oct 12 15:20:04 2015 +0800
@@ -32,6 +32,7 @@
 
     <ul class="submenu">
         <li><a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+        <li><a href="{url|urlescape}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
         <li><a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
         <li><a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
         <li class="current">diff</li>
--- a/mercurial/templates/monoblue/filerevision.tmpl	Fri Oct 09 15:44:00 2015 -0700
+++ b/mercurial/templates/monoblue/filerevision.tmpl	Mon Oct 12 15:20:04 2015 +0800
@@ -32,6 +32,7 @@
 
     <ul class="submenu">
         <li class="current">file</li>
+        <li><a href="{url|urlescape}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
         <li><a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
         <li><a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
         <li><a href="{url|urlescape}diff/{symrev}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
--- a/tests/test-hgweb-symrev.t	Fri Oct 09 15:44:00 2015 -0700
+++ b/tests/test-hgweb-symrev.t	Mon Oct 12 15:20:04 2015 +0800
@@ -783,6 +783,7 @@
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/xyzzy/foo?style=monoblue' | egrep $REVLINKS
               <li><a href="/graph/xyzzy?style=monoblue">graph</a></li>
               <li><a href="/file/xyzzy/?style=monoblue">files</a></li>
+          <li><a href="/file/tip/foo?style=monoblue">latest</a></li>
           <li><a href="/log/xyzzy/foo?style=monoblue">revisions</a></li>
           <li><a href="/annotate/xyzzy/foo?style=monoblue">annotate</a></li>
           <li><a href="/diff/xyzzy/foo?style=monoblue">diff</a></li>
@@ -814,6 +815,7 @@
               <li><a href="/graph/xyzzy?style=monoblue">graph</a></li>
               <li><a href="/file/xyzzy/?style=monoblue">files</a></li>
           <li><a href="/file/xyzzy/foo?style=monoblue">file</a></li>
+          <li><a href="/file/tip/foo?style=monoblue">latest</a></li>
           <li><a href="/log/xyzzy/foo?style=monoblue">revisions</a></li>
           <li><a href="/diff/xyzzy/foo?style=monoblue">diff</a></li>
           <li><a href="/comparison/xyzzy/foo?style=monoblue">comparison</a></li>
@@ -828,6 +830,7 @@
               <li><a href="/graph/xyzzy?style=monoblue">graph</a></li>
               <li><a href="/file/xyzzy?style=monoblue">files</a></li>
           <li><a href="/file/xyzzy/foo?style=monoblue">file</a></li>
+          <li><a href="/file/tip/foo?style=monoblue">latest</a></li>
           <li><a href="/log/xyzzy/foo?style=monoblue">revisions</a></li>
           <li><a href="/annotate/xyzzy/foo?style=monoblue">annotate</a></li>
           <li><a href="/comparison/xyzzy/foo?style=monoblue">comparison</a></li>
@@ -840,6 +843,7 @@
               <li><a href="/graph/xyzzy?style=monoblue">graph</a></li>
               <li><a href="/file/xyzzy?style=monoblue">files</a></li>
           <li><a href="/file/xyzzy/foo?style=monoblue">file</a></li>
+          <li><a href="/file/tip/foo?style=monoblue">latest</a></li>
           <li><a href="/log/xyzzy/foo?style=monoblue">revisions</a></li>
           <li><a href="/annotate/xyzzy/foo?style=monoblue">annotate</a></li>
           <li><a href="/diff/xyzzy/foo?style=monoblue">diff</a></li>