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

login
register
mail settings
Submitter Anton Shestakov
Date Dec. 8, 2016, 4:59 p.m.
Message ID <8c4b72f094d3955001ee.1481216381@neuro>
Download mbox | patch
Permalink /patch/17877/
State Accepted
Headers show

Comments

Anton Shestakov - Dec. 8, 2016, 4:59 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 8c4b72f094d3955001ee75257ba2a185c2cbbf96
# Parent  76e970c8f53071463032e9d0d81092a277b85b9a
hgweb: add missing slash to file log url in rss style
Augie Fackler - Dec. 8, 2016, 6:28 p.m.
On Fri, Dec 09, 2016 at 12:59:41AM +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 8c4b72f094d3955001ee75257ba2a185c2cbbf96
> # Parent  76e970c8f53071463032e9d0d81092a277b85b9a
> hgweb: add missing slash to file log url in rss style

Just noticed the v2. Queued.

>
> 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>
> diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
> --- a/tests/test-hgweb-commands.t
> +++ b/tests/test-hgweb-commands.t
> @@ -686,7 +686,7 @@ Logs and changes
>        <description>foo revision history</description>
>        <item>
>        <title>base</title>
> -      <link>http://*:$HGPORT/log2ef0ac749a14/foo</link> (glob)
> +      <link>http://*:$HGPORT/log/2ef0ac749a14/foo</link> (glob)
>        <description><![CDATA[base(websub)]]></description>
>        <author>&#116;&#101;&#115;&#116;</author>
>        <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
> diff --git a/tests/test-hgweb-filelog.t b/tests/test-hgweb-filelog.t
> --- a/tests/test-hgweb-filelog.t
> +++ b/tests/test-hgweb-filelog.t
> @@ -783,14 +783,14 @@ rss log
>        <description>a revision history</description>
>        <item>
>        <title>second a</title>
> -      <link>http://*:$HGPORT/log3f41bc784e7e/a</link> (glob)
> +      <link>http://*:$HGPORT/log/3f41bc784e7e/a</link> (glob)
>        <description><![CDATA[second a]]></description>
>        <author>&#116;&#101;&#115;&#116;</author>
>        <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
>    </item>
>    <item>
>        <title>first a</title>
> -      <link>http://*:$HGPORT/log5ed941583260/a</link> (glob)
> +      <link>http://*:$HGPORT/log/5ed941583260/a</link> (glob)
>        <description><![CDATA[first a]]></description>
>        <author>&#116;&#101;&#115;&#116;</author>
>        <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</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>
diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t
+++ b/tests/test-hgweb-commands.t
@@ -686,7 +686,7 @@  Logs and changes
       <description>foo revision history</description>
       <item>
       <title>base</title>
-      <link>http://*:$HGPORT/log2ef0ac749a14/foo</link> (glob)
+      <link>http://*:$HGPORT/log/2ef0ac749a14/foo</link> (glob)
       <description><![CDATA[base(websub)]]></description>
       <author>&#116;&#101;&#115;&#116;</author>
       <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
diff --git a/tests/test-hgweb-filelog.t b/tests/test-hgweb-filelog.t
--- a/tests/test-hgweb-filelog.t
+++ b/tests/test-hgweb-filelog.t
@@ -783,14 +783,14 @@  rss log
       <description>a revision history</description>
       <item>
       <title>second a</title>
-      <link>http://*:$HGPORT/log3f41bc784e7e/a</link> (glob)
+      <link>http://*:$HGPORT/log/3f41bc784e7e/a</link> (glob)
       <description><![CDATA[second a]]></description>
       <author>&#116;&#101;&#115;&#116;</author>
       <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
   </item>
   <item>
       <title>first a</title>
-      <link>http://*:$HGPORT/log5ed941583260/a</link> (glob)
+      <link>http://*:$HGPORT/log/5ed941583260/a</link> (glob)
       <description><![CDATA[first a]]></description>
       <author>&#116;&#101;&#115;&#116;</author>
       <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>