convert: Don't decode unicode strings
This does not work with python2.3 and is probably not useful anyway with 2.4.
--- a/hgext/convert/convcmd.py Sat Feb 09 13:08:02 2008 +0100
+++ b/hgext/convert/convcmd.py Sat Feb 09 13:13:46 2008 +0100
@@ -241,7 +241,10 @@
def convert(self):
def recode(s):
- return s.decode('utf-8').encode(orig_encoding, 'replace')
+ if isinstance(s, unicode):
+ return s.encode(orig_encoding, 'replace')
+ else:
+ return s.decode('utf-8').encode(orig_encoding, 'replace')
try:
self.source.before()