# HG changeset patch # User Thomas Arendsen Hein # Date 2007-09-07 14:14:51 # Node ID c6f932d3e0f6e48859218775fcc0e7098306d766 # Parent cbec83d9b0b435da94ebabca0a4169eafc745994 Don't decode unicode strings. This does not work with python2.3 and is probably not useful anyway with 2.4. diff --git a/hgext/convert/common.py b/hgext/convert/common.py --- a/hgext/convert/common.py +++ b/hgext/convert/common.py @@ -75,6 +75,8 @@ class converter_source(object): if not encoding: encoding = self.encoding or 'utf-8' + if isinstance(s, unicode): + return s.encode("utf-8") try: return s.decode(encoding).encode("utf-8") except: diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -278,7 +278,8 @@ class convert_svn(converter_source): def revid(self, revnum, module=None): if not module: module = self.module - return (u"svn:%s%s@%s" % (self.uuid, module, revnum)).decode(self.encoding) + return u"svn:%s%s@%s" % (self.uuid, module.decode(self.encoding), + revnum) def revnum(self, rev): return int(rev.split('@')[-1])