hgweb: fixed invalid atom-log feed url in file log page
authorYoshinari Takaoka <mumumu@mumumu.org>
Tue, 29 Dec 2015 00:48:03 +0900
changeset 27554 1c66497261b2
parent 27553 56caab876bd8
child 27556 1df9b8b2abda
hgweb: fixed invalid atom-log feed url in file log page currently "subscribe to atom feed" link in file log page is as follows. /atom-log/[revision]/[file] This is invalid, because we could not get newer commit feed than [revision]. To fix this, atom-log feed url should be the following style. atom-log/tip/[file]
mercurial/templates/paper/filelog.tmpl
tests/test-hgweb-filelog.t
tests/test-hgweb-symrev.t
--- a/mercurial/templates/paper/filelog.tmpl	Tue Dec 29 10:21:39 2015 -0800
+++ b/mercurial/templates/paper/filelog.tmpl	Tue Dec 29 00:48:03 2015 +0900
@@ -36,7 +36,7 @@
 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
 </ul>
 <div class="atom-logo">
-<a href="{url|urlescape}atom-log/{node|short}/{file|urlescape}" title="subscribe to atom feed">
+<a href="{url|urlescape}atom-log/tip/{file|urlescape}" title="subscribe to atom feed">
 <img class="atom-logo" src="{staticurl|urlescape}feed-icon-14x14.png" alt="atom feed" />
 </a>
 </div>
--- a/tests/test-hgweb-filelog.t	Tue Dec 29 10:21:39 2015 -0800
+++ b/tests/test-hgweb-filelog.t	Tue Dec 29 00:48:03 2015 +0900
@@ -179,7 +179,7 @@
   <li><a href="/help">help</a></li>
   </ul>
   <div class="atom-logo">
-  <a href="/atom-log/3f41bc784e7e/a" title="subscribe to atom feed">
+  <a href="/atom-log/tip/a" title="subscribe to atom feed">
   <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed" />
   </a>
   </div>
@@ -299,7 +299,7 @@
   <li><a href="/help">help</a></li>
   </ul>
   <div class="atom-logo">
-  <a href="/atom-log/3f41bc784e7e/a" title="subscribe to atom feed">
+  <a href="/atom-log/tip/a" title="subscribe to atom feed">
   <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed" />
   </a>
   </div>
@@ -419,7 +419,7 @@
   <li><a href="/help">help</a></li>
   </ul>
   <div class="atom-logo">
-  <a href="/atom-log/5ed941583260/a" title="subscribe to atom feed">
+  <a href="/atom-log/tip/a" title="subscribe to atom feed">
   <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed" />
   </a>
   </div>
@@ -531,7 +531,7 @@
   <li><a href="/help">help</a></li>
   </ul>
   <div class="atom-logo">
-  <a href="/atom-log/5ed941583260/a" title="subscribe to atom feed">
+  <a href="/atom-log/tip/a" title="subscribe to atom feed">
   <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="atom feed" />
   </a>
   </div>
--- a/tests/test-hgweb-symrev.t	Tue Dec 29 10:21:39 2015 -0800
+++ b/tests/test-hgweb-symrev.t	Tue Dec 29 00:48:03 2015 +0900
@@ -165,7 +165,7 @@
   <li><a href="/comparison/xyzzy/foo?style=paper">comparison</a></li>
   <li><a href="/annotate/xyzzy/foo?style=paper">annotate</a></li>
   <li><a href="/raw-file/xyzzy/foo">raw</a></li>
-  <a href="/atom-log/a7c1559b7bba/foo" title="subscribe to atom feed">
+  <a href="/atom-log/tip/foo" title="subscribe to atom feed">
    log foo @ 1:<a href="/rev/a7c1559b7bba?style=paper">a7c1559b7bba</a>
   <a href="/log/xyzzy/foo?revcount=30&style=paper">less</a>
   <a href="/log/xyzzy/foo?revcount=120&style=paper">more</a>
@@ -353,7 +353,7 @@
   <li><a href="/comparison/xyzzy/foo?style=coal">comparison</a></li>
   <li><a href="/annotate/xyzzy/foo?style=coal">annotate</a></li>
   <li><a href="/raw-file/xyzzy/foo">raw</a></li>
-  <a href="/atom-log/a7c1559b7bba/foo" title="subscribe to atom feed">
+  <a href="/atom-log/tip/foo" title="subscribe to atom feed">
    log foo @ 1:<a href="/rev/a7c1559b7bba?style=coal">a7c1559b7bba</a>
   <a href="/log/xyzzy/foo?revcount=30&style=coal">less</a>
   <a href="/log/xyzzy/foo?revcount=120&style=coal">more</a>