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

login
register
mail settings
Submitter Valters Vingolds
Date Jan. 4, 2017, 4:47 p.m.
Message ID <7817df5585db1d87d3f6.1483548473@w540>
Download mbox | patch
Permalink /patch/18091/
State Superseded
Headers show

Comments

Valters Vingolds - Jan. 4, 2017, 4:47 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 7817df5585db1d87d3f6c7f496085c86d87e2e9a
# Parent  76e970c8f53071463032e9d0d81092a277b85b9a
hgweb: add missing slash to file log url in rss style

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 @@ 
       <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 @@ 
       <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>