diff util.py @ 281:8ff0b3261b7f

util: drop 1.2 support in the encoding swap.
author Augie Fackler <durin42@gmail.com>
date Fri, 24 Apr 2009 21:07:59 -0500
parents 68aea59116b6
children f8f9a2993705
line wrap: on
line diff
--- a/util.py
+++ b/util.py
@@ -114,12 +114,9 @@ def describe_commit(ui, h, b):
 
 
 def swap_out_encoding(new_encoding="UTF-8"):
-    """ Utility for mercurial incompatibility changes, can be removed after 1.3"""
-    try:
-        from mercurial import encoding
-        old = encoding.encoding
-        encoding.encoding = new_encoding
-    except ImportError:
-        old = hgutil._encoding
-        hgutil._encoding = new_encoding
+    """ Utility for mercurial incompatibility changes, can be removed after 1.3
+    """
+    from mercurial import encoding
+    old = encoding.encoding
+    encoding.encoding = new_encoding
     return old