Mercurial > hg-stable
changeset 5287:c6f932d3e0f6
Don't decode unicode strings.
This does not work with python2.3 and is probably not useful anyway with 2.4.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 07 Sep 2007 16:14:51 +0200 |
parents | cbec83d9b0b4 |
children | 18091102a633 |
files | hgext/convert/common.py hgext/convert/subversion.py |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/common.py Thu Sep 06 18:12:36 2007 -0700 +++ b/hgext/convert/common.py Fri Sep 07 16:14:51 2007 +0200 @@ -75,6 +75,8 @@ 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:
--- a/hgext/convert/subversion.py Thu Sep 06 18:12:36 2007 -0700 +++ b/hgext/convert/subversion.py Fri Sep 07 16:14:51 2007 +0200 @@ -278,7 +278,8 @@ 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])