summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorReilly Grant <reillyeon@qotw.net>2009-09-10 00:02:38 -0700
committerJunio C Hamano <gitster@pobox.com>2009-09-10 11:22:22 -0700
commit1d7367dce7b55cbb1804c4863c56bd20ab12bda8 (patch)
tree03dca9c48bb270285fe800ea92a887f1080fe195 /contrib
parent0460dba4b4c47ac0b11ccb85b319792280422bc9 (diff)
downloadgit-1d7367dce7b55cbb1804c4863c56bd20ab12bda8.tar.gz
git-p4: Avoid modules deprecated in Python 2.6.
The popen2, sha and sets modules are deprecated in Python 2.6 (sha in Python 2.5). Both popen2 and sha are not actually used in git-p4. Replace usage of sets.Set with the builtin set object. The built-in set object was added in Python 2.4 and is already used in other parts of this script, so this dependency is nothing new. Signed-off-by: Reilly Grant <reillyeon@qotw.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p412
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 38438f3c4a..e710219ca5 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -8,12 +8,10 @@
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
#
-import optparse, sys, os, marshal, popen2, subprocess, shelve
-import tempfile, getopt, sha, os.path, time, platform
+import optparse, sys, os, marshal, subprocess, shelve
+import tempfile, getopt, os.path, time, platform
import re
-from sets import Set;
-
verbose = False
@@ -864,8 +862,8 @@ class P4Sync(Command):
self.usage += " //depot/path[@revRange]"
self.silent = False
- self.createdBranches = Set()
- self.committedChanges = Set()
+ self.createdBranches = set()
+ self.committedChanges = set()
self.branch = ""
self.detectBranches = False
self.detectLabels = False
@@ -1662,7 +1660,7 @@ class P4Sync(Command):
if len(self.changesFile) > 0:
output = open(self.changesFile).readlines()
- changeSet = Set()
+ changeSet = set()
for line in output:
changeSet.add(int(line))