Use sets.Set() instead of set() to run also with older versions of Python.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Simon Hausmann committed
Feb 15, 2007 at 02:16 UTC
f1e9b5345efade26961289860ced9e5c428360a4
1 file changed
+7
-6
contrib/fast-import/p4-fast-export.py
+7
-6
@@ -11,9 +11,10 @@
11
#
12
import os, string, sys, time
13
import marshal, popen2, getopt
14
+from sets import Set;
15
15
-knownBranches = set()
16
-committedChanges = set()
16
+knownBranches = Set()
17
+committedChanges = Set()
18
branch = "refs/heads/master"
19
globalPrefix = previousDepotPath = os.popen("git-repo-config --get p4.depotpath").read()
20
detectBranches = False
@@ -129,7 +130,7 @@ def isSubPathOf(first, second):
130
131
def branchesForCommit(files):
132
global knownBranches
132
- branches = set()
133
+ branches = Set()
134
135
for file in files:
136
relativePath = file["path"][len(globalPrefix):]
@@ -205,8 +206,8 @@ def commit(details, files, branch, branchPrefix):
206
gitStream.write("from %s\n" % initialParent)
207
initialParent = ""
208
208
- #mergedBranches = set()
209
- merges = set()
209
+ #mergedBranches = Set()
210
+ merges = Set()
211
212
for file in files:
213
if lastChange == 0:
@@ -366,7 +367,7 @@ else:
367
368
if len(changesFile) > 0:
369
output = open(changesFile).readlines()
369
- changeSet = set()
370
+ changeSet = Set()
371
for line in output:
372
changeSet.add(int(line))
373