From: Simon Hausmann Date: Wed, 14 Feb 2007 16:16:14 +0000 (+1000) Subject: Run also with older versions of Python X-Git-Url: http://crossforests.com/gitweb?a=commitdiff_plain;h=751eb34307965782b714d7bbd494507dabf39b4d;p=python%2Ffast-export.git Run also with older versions of Python --- diff --git a/p4-fast-export.py b/p4-fast-export.py index b5dc6f6..76c4b9d 100755 --- a/p4-fast-export.py +++ b/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))