[PATCH stable] templatefilters: add missing import of _
Mads Kiilerich
mads at kiilerich.com
Mon Feb 25 20:39:49 CST 2013
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1361844560 -3600
# Branch stable
# Node ID b1f0fd26bda704357708c73fdeb78f1b6f372238
# Parent 61c8327ced503bf7a1996337af711e0f4a58d4c0
templatefilters: add missing import of _
diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py
--- a/mercurial/templatefilters.py
+++ b/mercurial/templatefilters.py
@@ -5,6 +5,7 @@
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
+from i18n import _
import cgi, re, os, time, urllib
import encoding, node, util, error
import hbisect
diff --git a/tests/test-template-engine.t b/tests/test-template-engine.t
--- a/tests/test-template-engine.t
+++ b/tests/test-template-engine.t
@@ -44,4 +44,15 @@
0 97e5f848f0936960273bbf75be6388cd0350a32b -1 0000000000000000000000000000000000000000
-1 0000000000000000000000000000000000000000 -1 0000000000000000000000000000000000000000
+ $ hg tip --template '{fill(node, 7)}\n'
+ hg: parse error: fill expects an integer width
+ [255]
+ $ hg tip --template '{fill(node, "7")}\n'
+ ef4a3af
+ ceb5370
+ e8500df
+ 6f7b191
+ e48998e
+ 059af
+
$ cd ..
More information about the Mercurial-devel
mailing list