[PATCH 2 of 6] Provide a version independent way to use the set datatype
Eric Hopper
hopper at omnifarious.org
Thu Jun 7 17:58:08 CDT 2007
# HG changeset patch
# User Eric Hopper <hopper at omnifarious.org>
# Date 1181256552 25200
# Node ID d8f52bfc3b38809aff35efb8a34a6347ba228af7
# Parent 04f49562a1eb805adfa78349c64561a539538e6f
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
@@ -15,6 +15,13 @@ from i18n import _
from i18n import _
import cStringIO, errno, getpass, popen2, re, shutil, sys, tempfile
import os, threading, time, calendar, ConfigParser, locale, glob
+
+try:
+ hgset = set
+ hgfrozenset = frozenset
+except NameError, e:
+ from sets import Set as hgset
+ from sets import ImmutableSet as hgfrozenset
try:
_encoding = os.environ.get("HGENCODING") or locale.getpreferredencoding() \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20070607/9e13f7cf/attachment.pgp
More information about the Mercurial-devel
mailing list