[PATCH] hgweb: fixed invalid atom-log feed url in file log page

Augie Fackler raf at durin42.com
Tue Dec 29 16:13:49 CST 2015


On Tue, Dec 29, 2015 at 01:09:05AM +0900, Yoshinari Takaoka wrote:
> # HG changeset patch
> # User Yoshinari Takaoka <mumumu at mumumu.org>
> # Date 1451317683 -32400
> #      Tue Dec 29 00:48:03 2015 +0900
> # Node ID 968800c85bfc618a12915b0fa0c5cf3142393d54
> # Parent  dbfaf361c062e4c5a084925f827d11cf95e4a253
> hgweb: fixed invalid atom-log feed url in file log page

Queued this, congratulations on your first patch to Mercurial!

>
> 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]
>
>
> diff -r dbfaf361c062 -r 968800c85bfc mercurial/templates/paper/filelog.tmpl
> --- a/mercurial/templates/paper/filelog.tmpl    Sun Dec 27 23:55:54 2015 +0900
> +++ 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>
> diff -r dbfaf361c062 -r 968800c85bfc tests/test-hgweb-filelog.t
> --- a/tests/test-hgweb-filelog.t        Sun Dec 27 23:55:54 2015 +0900
> +++ 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>
> diff -r dbfaf361c062 -r 968800c85bfc tests/test-hgweb-symrev.t
> --- a/tests/test-hgweb-symrev.t Sun Dec 27 23:55:54 2015 +0900
> +++ 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>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list