[PATCH 2 of 5] hgweb: reindent rss/changelogentry.tmpl

Anton Shestakov av6 at dwimlabs.net
Wed Jun 29 11:22:30 EDT 2016


# HG changeset patch
# User Anton Shestakov <av6 at dwimlabs.net>
# Date 1467202744 -28800
#      Wed Jun 29 20:19:04 2016 +0800
# Node ID 6ac80ecd761290131c0d1a109270b51b89db7105
# Parent  5e2056b50c925ffbc520f5e09ab7d58b5821e7ec
hgweb: reindent rss/changelogentry.tmpl

It was mixing tabs and spaces, and not in a good way.

Indent style of other rss entries seems to be 4 spaces per level, so let's
apply it here as well.

diff --git a/mercurial/templates/rss/changelogentry.tmpl b/mercurial/templates/rss/changelogentry.tmpl
--- a/mercurial/templates/rss/changelogentry.tmpl
+++ b/mercurial/templates/rss/changelogentry.tmpl
@@ -1,40 +1,41 @@
 <item>
     <title>{inbranch%"{if(name, '[{name|escape}] ')}"}{branches%"{if(name, '[{name|escape}] ')}"}{desc|strip|firstline|strip|escape}</title>
     <guid isPermaLink="true">{urlbase}{url|urlescape}rev/{node|short}</guid>
-             <link>{urlbase}{url|urlescape}rev/{node|short}</link>
+    <link>{urlbase}{url|urlescape}rev/{node|short}</link>
     <description>
-              <![CDATA[
-	<table>
-	<tr>
-		<th style="text-align:left;">changeset</th>
-		<td>{node|short}</td>
-              </tr>
-              <tr>
-                              <th style="text-align:left;">branch</th>
-                              <td>{inbranch%"{name|escape}"}{branches%"{name|escape}"}</td>
-              </tr>
-              <tr>
-                              <th style="text-align:left;">bookmark</th>
-		<td>{bookmarks%"{name|escape}"}</td>
-	</tr>
-	<tr>
-		<th style="text-align:left;">tag</th>
-		<td>{tags%"{name|escape}"}</td>
-	</tr>
-	<tr>
-		<th style="text-align:left;vertical-align:top;">user</th>
-		<td>{author|obfuscate}</td>
-	</tr>
-	<tr>
-		<th style="text-align:left;vertical-align:top;">description</th>
-		<td>{desc|strip|escape|websub|addbreaks|nonempty}</td>
-	</tr>
-	<tr>
-		<th style="text-align:left;vertical-align:top;">files</th>
-		<td>{files}</td>
-	</tr>
-	</table>
-	]]></description>
+    <![CDATA[
+        <table>
+            <tr>
+                <th style="text-align:left;">changeset</th>
+                <td>{node|short}</td>
+            </tr>
+            <tr>
+                <th style="text-align:left;">branch</th>
+                <td>{inbranch%"{name|escape}"}{branches%"{name|escape}"}</td>
+            </tr>
+            <tr>
+                <th style="text-align:left;">bookmark</th>
+                <td>{bookmarks%"{name|escape}"}</td>
+            </tr>
+            <tr>
+                <th style="text-align:left;">tag</th>
+                <td>{tags%"{name|escape}"}</td>
+            </tr>
+            <tr>
+                <th style="text-align:left;vertical-align:top;">user</th>
+                <td>{author|obfuscate}</td>
+            </tr>
+            <tr>
+                <th style="text-align:left;vertical-align:top;">description</th>
+                <td>{desc|strip|escape|websub|addbreaks|nonempty}</td>
+            </tr>
+            <tr>
+                <th style="text-align:left;vertical-align:top;">files</th>
+                <td>{files}</td>
+            </tr>
+        </table>
+    ]]>
+    </description>
     <author>{author|obfuscate}</author>
     <pubDate>{date|rfc822date}</pubDate>
 </item>
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
@@ -258,160 +258,164 @@ Logs and changes
       <item>
       <title>[unstable] branch commit with null character: </title>
       <guid isPermaLink="true">http://*:$HGPORT/rev/cad8025a2e87</guid> (glob)
-               <link>http://*:$HGPORT/rev/cad8025a2e87</link> (glob)
+      <link>http://*:$HGPORT/rev/cad8025a2e87</link> (glob)
       <description>
-                <![CDATA[
-  	<table>
-  	<tr>
-  		<th style="text-align:left;">changeset</th>
-  		<td>cad8025a2e87</td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">branch</th>
-                                <td>unstable</td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">bookmark</th>
-  		<td>something</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;">tag</th>
-  		<td>tip</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">user</th>
-  		<td>test</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">description</th>
-  		<td>branch commit with null character: (websub)</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">files</th>
-  		<td></td>
-  	</tr>
-  	</table>
-  	]]></description>
+      <![CDATA[
+          <table>
+              <tr>
+                  <th style="text-align:left;">changeset</th>
+                  <td>cad8025a2e87</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">branch</th>
+                  <td>unstable</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">bookmark</th>
+                  <td>something</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">tag</th>
+                  <td>tip</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">user</th>
+                  <td>test</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">description</th>
+                  <td>branch commit with null character: (websub)</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">files</th>
+                  <td></td>
+              </tr>
+          </table>
+      ]]>
+      </description>
       <author>test</author>
       <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
   </item>
   <item>
       <title>[stable] branch</title>
       <guid isPermaLink="true">http://*:$HGPORT/rev/1d22e65f027e</guid> (glob)
-               <link>http://*:$HGPORT/rev/1d22e65f027e</link> (glob)
+      <link>http://*:$HGPORT/rev/1d22e65f027e</link> (glob)
       <description>
-                <![CDATA[
-  	<table>
-  	<tr>
-  		<th style="text-align:left;">changeset</th>
-  		<td>1d22e65f027e</td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">branch</th>
-                                <td>stable</td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">bookmark</th>
-  		<td></td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;">tag</th>
-  		<td></td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">user</th>
-  		<td>test</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">description</th>
-  		<td>branch(websub)</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">files</th>
-  		<td>foo<br /></td>
-  	</tr>
-  	</table>
-  	]]></description>
+      <![CDATA[
+          <table>
+              <tr>
+                  <th style="text-align:left;">changeset</th>
+                  <td>1d22e65f027e</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">branch</th>
+                  <td>stable</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">bookmark</th>
+                  <td></td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">tag</th>
+                  <td></td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">user</th>
+                  <td>test</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">description</th>
+                  <td>branch(websub)</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">files</th>
+                  <td>foo<br /></td>
+              </tr>
+          </table>
+      ]]>
+      </description>
       <author>test</author>
       <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
   </item>
   <item>
       <title>[default] Added tag 1.0 for changeset 2ef0ac749a14</title>
       <guid isPermaLink="true">http://*:$HGPORT/rev/a4f92ed23982</guid> (glob)
-               <link>http://*:$HGPORT/rev/a4f92ed23982</link> (glob)
+      <link>http://*:$HGPORT/rev/a4f92ed23982</link> (glob)
       <description>
-                <![CDATA[
-  	<table>
-  	<tr>
-  		<th style="text-align:left;">changeset</th>
-  		<td>a4f92ed23982</td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">branch</th>
-                                <td>default</td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">bookmark</th>
-  		<td></td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;">tag</th>
-  		<td></td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">user</th>
-  		<td>test</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">description</th>
-  		<td>Added tag 1.0 for changeset 2ef0ac749a14(websub)</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">files</th>
-  		<td>.hgtags<br /></td>
-  	</tr>
-  	</table>
-  	]]></description>
+      <![CDATA[
+          <table>
+              <tr>
+                  <th style="text-align:left;">changeset</th>
+                  <td>a4f92ed23982</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">branch</th>
+                  <td>default</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">bookmark</th>
+                  <td></td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">tag</th>
+                  <td></td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">user</th>
+                  <td>test</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">description</th>
+                  <td>Added tag 1.0 for changeset 2ef0ac749a14(websub)</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">files</th>
+                  <td>.hgtags<br /></td>
+              </tr>
+          </table>
+      ]]>
+      </description>
       <author>test</author>
       <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
   </item>
   <item>
       <title>base</title>
       <guid isPermaLink="true">http://*:$HGPORT/rev/2ef0ac749a14</guid> (glob)
-               <link>http://*:$HGPORT/rev/2ef0ac749a14</link> (glob)
+      <link>http://*:$HGPORT/rev/2ef0ac749a14</link> (glob)
       <description>
-                <![CDATA[
-  	<table>
-  	<tr>
-  		<th style="text-align:left;">changeset</th>
-  		<td>2ef0ac749a14</td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">branch</th>
-                                <td></td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">bookmark</th>
-  		<td>anotherthing</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;">tag</th>
-  		<td>1.0</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">user</th>
-  		<td>test</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">description</th>
-  		<td>base(websub)</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">files</th>
-  		<td>da/foo<br />foo<br /></td>
-  	</tr>
-  	</table>
-  	]]></description>
+      <![CDATA[
+          <table>
+              <tr>
+                  <th style="text-align:left;">changeset</th>
+                  <td>2ef0ac749a14</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">branch</th>
+                  <td></td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">bookmark</th>
+                  <td>anotherthing</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">tag</th>
+                  <td>1.0</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">user</th>
+                  <td>test</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">description</th>
+                  <td>base(websub)</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">files</th>
+                  <td>da/foo<br />foo<br /></td>
+              </tr>
+          </table>
+      ]]>
+      </description>
       <author>test</author>
       <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
   </item>
@@ -532,80 +536,82 @@ Logs and changes
       <item>
       <title>[default] Added tag 1.0 for changeset 2ef0ac749a14</title>
       <guid isPermaLink="true">http://*:$HGPORT/rev/a4f92ed23982</guid> (glob)
-               <link>http://*:$HGPORT/rev/a4f92ed23982</link> (glob)
+      <link>http://*:$HGPORT/rev/a4f92ed23982</link> (glob)
       <description>
-                <![CDATA[
-  	<table>
-  	<tr>
-  		<th style="text-align:left;">changeset</th>
-  		<td>a4f92ed23982</td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">branch</th>
-                                <td>default</td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">bookmark</th>
-  		<td></td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;">tag</th>
-  		<td></td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">user</th>
-  		<td>test</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">description</th>
-  		<td>Added tag 1.0 for changeset 2ef0ac749a14(websub)</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">files</th>
-  		<td>.hgtags<br /></td>
-  	</tr>
-  	</table>
-  	]]></description>
+      <![CDATA[
+          <table>
+              <tr>
+                  <th style="text-align:left;">changeset</th>
+                  <td>a4f92ed23982</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">branch</th>
+                  <td>default</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">bookmark</th>
+                  <td></td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">tag</th>
+                  <td></td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">user</th>
+                  <td>test</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">description</th>
+                  <td>Added tag 1.0 for changeset 2ef0ac749a14(websub)</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">files</th>
+                  <td>.hgtags<br /></td>
+              </tr>
+          </table>
+      ]]>
+      </description>
       <author>test</author>
       <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
   </item>
   <item>
       <title>base</title>
       <guid isPermaLink="true">http://*:$HGPORT/rev/2ef0ac749a14</guid> (glob)
-               <link>http://*:$HGPORT/rev/2ef0ac749a14</link> (glob)
+      <link>http://*:$HGPORT/rev/2ef0ac749a14</link> (glob)
       <description>
-                <![CDATA[
-  	<table>
-  	<tr>
-  		<th style="text-align:left;">changeset</th>
-  		<td>2ef0ac749a14</td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">branch</th>
-                                <td></td>
-                </tr>
-                <tr>
-                                <th style="text-align:left;">bookmark</th>
-  		<td>anotherthing</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;">tag</th>
-  		<td>1.0</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">user</th>
-  		<td>test</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">description</th>
-  		<td>base(websub)</td>
-  	</tr>
-  	<tr>
-  		<th style="text-align:left;vertical-align:top;">files</th>
-  		<td>da/foo<br />foo<br /></td>
-  	</tr>
-  	</table>
-  	]]></description>
+      <![CDATA[
+          <table>
+              <tr>
+                  <th style="text-align:left;">changeset</th>
+                  <td>2ef0ac749a14</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">branch</th>
+                  <td></td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">bookmark</th>
+                  <td>anotherthing</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;">tag</th>
+                  <td>1.0</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">user</th>
+                  <td>test</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">description</th>
+                  <td>base(websub)</td>
+              </tr>
+              <tr>
+                  <th style="text-align:left;vertical-align:top;">files</th>
+                  <td>da/foo<br />foo<br /></td>
+              </tr>
+          </table>
+      ]]>
+      </description>
       <author>test</author>
       <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
   </item>


More information about the Mercurial-devel mailing list