summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <hausmann@kde.org>2007-02-15 02:16:14 +1000
committerLibravatar Simon Hausmann <hausmann@kde.org>2007-02-15 02:16:14 +1000
commitf1e9b5345efade26961289860ced9e5c428360a4 (patch)
tree3ada376de0cefea7cca1f399a3ea9eef2758735f
parentMake it possible to specify the p4 changes to import through a text file (for... (diff)
downloadtgif-f1e9b5345efade26961289860ced9e5c428360a4.tar.xz
Use sets.Set() instead of set() to run also with older versions of Python.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
-rwxr-xr-xcontrib/fast-import/p4-fast-export.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/fast-import/p4-fast-export.py b/contrib/fast-import/p4-fast-export.py
index b5dc6f6767..76c4b9d323 100755
--- a/contrib/fast-import/p4-fast-export.py
+++ b/contrib/fast-import/p4-fast-export.py
@@ -11,9 +11,10 @@
#
import os, string, sys, time
import marshal, popen2, getopt
+from sets import Set;
-knownBranches = set()
-committedChanges = set()
+knownBranches = Set()
+committedChanges = Set()
branch = "refs/heads/master"
globalPrefix = previousDepotPath = os.popen("git-repo-config --get p4.depotpath").read()
detectBranches = False
@@ -129,7 +130,7 @@ def isSubPathOf(first, second):
def branchesForCommit(files):
global knownBranches
- branches = set()
+ branches = Set()
for file in files:
relativePath = file["path"][len(globalPrefix):]
@@ -205,8 +206,8 @@ def commit(details, files, branch, branchPrefix):
gitStream.write("from %s\n" % initialParent)
initialParent = ""
- #mergedBranches = set()
- merges = set()
+ #mergedBranches = Set()
+ merges = Set()
for file in files:
if lastChange == 0:
@@ -366,7 +367,7 @@ else:
if len(changesFile) > 0:
output = open(changesFile).readlines()
- changeSet = set()
+ changeSet = Set()
for line in output:
changeSet.add(int(line))