Provide a version independent way to use the set datatype.
authorEric Hopper <hopper@omnifarious.org>
Tue, 19 Jun 2007 08:37:41 -0700
changeset 4647 7c80e3e6f030
parent 4646 196d90bf5c15
child 4648 8e503fa54d2d
Provide a version independent way to use the set datatype.
mercurial/util.py
--- a/mercurial/util.py	Tue Jun 19 17:03:31 2007 +0200
+++ b/mercurial/util.py	Tue Jun 19 08:37:41 2007 -0700
@@ -17,6 +17,12 @@
 import os, threading, time, calendar, ConfigParser, locale, glob
 
 try:
+    set = set
+    frozenset = frozenset
+except NameError:
+    from sets import Set as set, ImmutableSet as frozenset
+
+try:
     _encoding = os.environ.get("HGENCODING")
     if sys.platform == 'darwin' and not _encoding:
         # On darwin, getpreferredencoding ignores the locale environment and