Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
4646:196d90bf5c15 | 4647:7c80e3e6f030 |
---|---|
13 """ | 13 """ |
14 | 14 |
15 from i18n import _ | 15 from i18n import _ |
16 import cStringIO, errno, getpass, popen2, re, shutil, sys, tempfile | 16 import cStringIO, errno, getpass, popen2, re, shutil, sys, tempfile |
17 import os, threading, time, calendar, ConfigParser, locale, glob | 17 import os, threading, time, calendar, ConfigParser, locale, glob |
18 | |
19 try: | |
20 set = set | |
21 frozenset = frozenset | |
22 except NameError: | |
23 from sets import Set as set, ImmutableSet as frozenset | |
18 | 24 |
19 try: | 25 try: |
20 _encoding = os.environ.get("HGENCODING") | 26 _encoding = os.environ.get("HGENCODING") |
21 if sys.platform == 'darwin' and not _encoding: | 27 if sys.platform == 'darwin' and not _encoding: |
22 # On darwin, getpreferredencoding ignores the locale environment and | 28 # On darwin, getpreferredencoding ignores the locale environment and |