The previous fix didn't quite do it. It missed the _fallbackencoding.

-- 
Sune.

# HG changeset patch
# User Sune Foldager <[email protected]>
# Date 1239015410 -7200
# Node ID 3f626c666d6983e01643302ff4f94c92df7d5116
# Parent  91ffb887766863e8f4d39832a84e5321bd95f740
Another update for the new hg-crew encoding module

diff -r 91ffb8877668 -r 3f626c666d69 hggtk/hglib.py
--- a/hggtk/hglib.py    Mon Apr 06 05:18:29 2009 +0300
+++ b/hggtk/hglib.py    Mon Apr 06 12:56:50 2009 +0200
@@ -33,9 +33,11 @@
     from mercurial import encoding
     _encoding = encoding.encoding
     _encodingmode = encoding.encodingmode
+    _fallbackencoding = encoding.fallbackencoding
 except ImportError:
     _encoding = util._encoding
     _encodingmode = util._encodingmode
+    _fallbackencoding = util._fallbackencoding
 
 def toutf(s):
     """
@@ -48,7 +50,7 @@
             return s.decode(e, 'strict').encode('utf-8')
         except UnicodeDecodeError:
             pass
-    return s.decode(util._fallbackencoding, 'replace').encode('utf-8')
+    return s.decode(_fallbackencoding, 'replace').encode('utf-8')
 
 def fromutf(s):
     """
@@ -62,7 +64,7 @@
         pass
     except UnicodeEncodeError:
         pass
-    return s.decode('utf-8').encode(util._fallbackencoding)
+    return s.decode('utf-8').encode(_fallbackencoding)
 
 def rootpath(path=None):
     """ find Mercurial's repo root of path """
@@ -332,7 +334,7 @@
     # check for fallback encoding
     fallback = ui.config('ui', 'fallbackencoding')
     if fallback:
-        util._fallbackencoding = fallback
+        _fallbackencoding = fallback
 
     fullargs = args
     cmd, func, args, options, cmdoptions = parse(ui, args)


------------------------------------------------------------------------------
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to