Patchwork [1,of,3] hgweb: remove unneeded escaping in gitweb/map and monoblue/map

login
register
mail settings
Submitter Anton Shestakov
Date Feb. 11, 2015, 6:21 p.m.
Message ID <b6586f1525b323d228eb.1423678861@neuro>
Download mbox | patch
Permalink /patch/7789/
State Accepted
Headers show

Comments

Anton Shestakov - Feb. 11, 2015, 6:21 p.m.
# HG changeset patch
# User Anton Shestakov <engored@ya.ru>
# Date 1420890187 -28800
#      Sat Jan 10 19:43:07 2015 +0800
# Node ID b6586f1525b323d228eb1f37d05f888b6993407f
# Parent  ff5caa8dfd993680d9602ca6ebb14da9de10d5f4
hgweb: remove unneeded escaping in gitweb/map and monoblue/map

Elements in map files work slightly different from regular python strings, so
escaping single quotes is not necessary. It is also demonstrated by the very
same lines: '(current diff)'.

I should've made this in 9e1f4c65f5f5, but here we go.

Patch

diff --git a/mercurial/templates/gitweb/map b/mercurial/templates/gitweb/map
--- a/mercurial/templates/gitweb/map
+++ b/mercurial/templates/gitweb/map
@@ -140,7 +140,7 @@  changesetparentdiff = '
   <tr>
     <td>parent {rev}</td>
     <td style="font-family:monospace">
-      {changesetlink} {ifeq(node, basenode, '(current diff)', \'({difffrom})\')}
+      {changesetlink} {ifeq(node, basenode, '(current diff)', '({difffrom})')}
     </td>
   </tr>'
 difffrom = '<a href="{url|urlescape}rev/{node|short}:{originalnode|short}{sessionvars%urlparameter}">diff</a>'
diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map
--- a/mercurial/templates/monoblue/map
+++ b/mercurial/templates/monoblue/map
@@ -129,7 +129,7 @@  changesetparent = '
   <dd>{changesetlink}</dd>'
 changesetparentdiff = '
   <dt>parent {rev}</dt>
-  <dd>{changesetlink} {ifeq(node, basenode, '(current diff)', \'({difffrom})\')}</dd>'
+  <dd>{changesetlink} {ifeq(node, basenode, '(current diff)', '({difffrom})')}</dd>'
 difffrom = '<a href="{url|urlescape}rev/{node|short}:{originalnode|short}{sessionvars%urlparameter}">diff</a>'
 filerevbranch = '<dt>branch</dt><dd>{name|escape}</dd>'
 filerevparent = '