Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templatefilters.py @ 7948:de377b1a9a84
move encoding bits from util to encoding
In addition to cleaning up util, this gets rid of some circular dependencies.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 03 Apr 2009 14:51:48 -0500 |
parents | 9c8bbae02e9c |
children | 6a77ba181bc6 |
line wrap: on
line diff
--- a/mercurial/templatefilters.py Fri Apr 03 13:20:52 2009 -0500 +++ b/mercurial/templatefilters.py Fri Apr 03 14:51:48 2009 -0500 @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. import cgi, re, os, time, urllib, textwrap -import util, templater +import util, templater, encoding agescales = [("second", 1), ("minute", 60), @@ -76,7 +76,7 @@ return text.replace('\n', '<br/>\n') def obfuscate(text): - text = unicode(text, util._encoding, 'replace') + text = unicode(text, encoding.encoding, 'replace') return ''.join(['&#%d;' % ord(c) for c in text]) def domain(author):