# HG changeset patch # User Eric Hopper # Date 1182267461 25200 # Node ID 7c80e3e6f03066499adfef9992cb824fb59a02b4 # Parent 196d90bf5c151257abc34ad0186c4d91359c9917 Provide a version independent way to use the set datatype. diff --git a/mercurial/util.py b/mercurial/util.py --- 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