Patchwork [STABLE] hgweb: add missing slash to file log url in rss style

login
register
mail settings
Submitter Anton Shestakov
Date Dec. 8, 2016, 4:05 p.m.
Message ID <7af393a85bbd43c56d04.1481213144@neuro>
Download mbox | patch
Permalink /patch/17876/
State Superseded
Headers show

Comments

Anton Shestakov - Dec. 8, 2016, 4:05 p.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1481212776 -28800
#      Thu Dec 08 23:59:36 2016 +0800
# Branch stable
# Node ID 7af393a85bbd43c56d0415504429895681d4a643
# Parent  76e970c8f53071463032e9d0d81092a277b85b9a
hgweb: add missing slash to file log url in rss style

Otherwise it's like /logdf5ecb813426/README.
Augie Fackler - Dec. 8, 2016, 6:17 p.m.
On Fri, Dec 09, 2016 at 12:05:44AM +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <av6@dwimlabs.net>
> # Date 1481212776 -28800
> #      Thu Dec 08 23:59:36 2016 +0800
> # Branch stable
> # Node ID 7af393a85bbd43c56d0415504429895681d4a643
> # Parent  76e970c8f53071463032e9d0d81092a277b85b9a
> hgweb: add missing slash to file log url in rss style

Good catch. Queued.

(Random thought: a bored but motivated contributor might find a way to
chase all the links in the rss output and make sure they serve 200s,
but that wouldn't be appropriate for stable.)

>
> Otherwise it's like /logdf5ecb813426/README.
>
> diff --git a/mercurial/templates/rss/filelogentry.tmpl b/mercurial/templates/rss/filelogentry.tmpl
> --- a/mercurial/templates/rss/filelogentry.tmpl
> +++ b/mercurial/templates/rss/filelogentry.tmpl
> @@ -1,6 +1,6 @@
>  <item>
>      <title>{desc|strip|firstline|strip|escape}</title>
> -    <link>{urlbase}{url|urlescape}log{node|short}/{file|urlescape}</link>
> +    <link>{urlbase}{url|urlescape}log/{node|short}/{file|urlescape}</link>
>      <description><![CDATA[{desc|strip|escape|websub|addbreaks|nonempty}]]></description>
>      <author>{author|obfuscate}</author>
>      <pubDate>{date|rfc822date}</pubDate>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/templates/rss/filelogentry.tmpl b/mercurial/templates/rss/filelogentry.tmpl
--- a/mercurial/templates/rss/filelogentry.tmpl
+++ b/mercurial/templates/rss/filelogentry.tmpl
@@ -1,6 +1,6 @@ 
 <item>
     <title>{desc|strip|firstline|strip|escape}</title>
-    <link>{urlbase}{url|urlescape}log{node|short}/{file|urlescape}</link>
+    <link>{urlbase}{url|urlescape}log/{node|short}/{file|urlescape}</link>
     <description><![CDATA[{desc|strip|escape|websub|addbreaks|nonempty}]]></description>
     <author>{author|obfuscate}</author>
     <pubDate>{date|rfc822date}</pubDate>