diff mercurial/util.py @ 4647:7c80e3e6f030

Provide a version independent way to use the set datatype.
author Eric Hopper <hopper@omnifarious.org>
date Tue, 19 Jun 2007 08:37:41 -0700
parents 63b9d2deed48
children e241598e956f 272c0a09b203
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -17,6 +17,12 @@ import cStringIO, errno, getpass, popen2
 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