Use sets.Set() instead of set() to run also with older versions of Python.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
This commit is contained in:
parent
0563a4538a
commit
f1e9b5345e
@ -11,9 +11,10 @@
|
|||||||
#
|
#
|
||||||
import os, string, sys, time
|
import os, string, sys, time
|
||||||
import marshal, popen2, getopt
|
import marshal, popen2, getopt
|
||||||
|
from sets import Set;
|
||||||
|
|
||||||
knownBranches = set()
|
knownBranches = Set()
|
||||||
committedChanges = set()
|
committedChanges = Set()
|
||||||
branch = "refs/heads/master"
|
branch = "refs/heads/master"
|
||||||
globalPrefix = previousDepotPath = os.popen("git-repo-config --get p4.depotpath").read()
|
globalPrefix = previousDepotPath = os.popen("git-repo-config --get p4.depotpath").read()
|
||||||
detectBranches = False
|
detectBranches = False
|
||||||
@ -129,7 +130,7 @@ def isSubPathOf(first, second):
|
|||||||
|
|
||||||
def branchesForCommit(files):
|
def branchesForCommit(files):
|
||||||
global knownBranches
|
global knownBranches
|
||||||
branches = set()
|
branches = Set()
|
||||||
|
|
||||||
for file in files:
|
for file in files:
|
||||||
relativePath = file["path"][len(globalPrefix):]
|
relativePath = file["path"][len(globalPrefix):]
|
||||||
@ -205,8 +206,8 @@ def commit(details, files, branch, branchPrefix):
|
|||||||
gitStream.write("from %s\n" % initialParent)
|
gitStream.write("from %s\n" % initialParent)
|
||||||
initialParent = ""
|
initialParent = ""
|
||||||
|
|
||||||
#mergedBranches = set()
|
#mergedBranches = Set()
|
||||||
merges = set()
|
merges = Set()
|
||||||
|
|
||||||
for file in files:
|
for file in files:
|
||||||
if lastChange == 0:
|
if lastChange == 0:
|
||||||
@ -366,7 +367,7 @@ else:
|
|||||||
|
|
||||||
if len(changesFile) > 0:
|
if len(changesFile) > 0:
|
||||||
output = open(changesFile).readlines()
|
output = open(changesFile).readlines()
|
||||||
changeSet = set()
|
changeSet = Set()
|
||||||
for line in output:
|
for line in output:
|
||||||
changeSet.add(int(line))
|
changeSet.add(int(line))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user