summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-08-26 16:04:34 +0200
committerLibravatar Simon Hausmann <simon@lst.de>2007-09-03 20:35:13 +0200
commit1c49fc197bd05a4c2ed602efcdbe277ef798813a (patch)
tree425ec3659a817f2d40cab9f67c0068733beccffc /contrib
parentgit-p4: Cleanup; moved the code to import a list of p4 changes using fast-imp... (diff)
downloadtgif-1c49fc197bd05a4c2ed602efcdbe277ef798813a.tar.xz
git-p4: Cleanup; Turn self.revision into a function local variable (it's not used anywhere outside the function).
Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p418
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index c00702c895..d7c5becc0e 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1285,7 +1285,7 @@ class P4Sync(Command):
self.depotPaths = sorted(args)
- self.revision = ""
+ revision = ""
self.users = {}
newPaths = []
@@ -1296,15 +1296,15 @@ class P4Sync(Command):
if self.changeRange == "@all":
self.changeRange = ""
elif ',' not in self.changeRange:
- self.revision = self.changeRange
+ revision = self.changeRange
self.changeRange = ""
p = p[:atIdx]
elif p.find("#") != -1:
hashIdx = p.index("#")
- self.revision = p[hashIdx:]
+ revision = p[hashIdx:]
p = p[:hashIdx]
elif self.previousDepotPaths == []:
- self.revision = "#head"
+ revision = "#head"
p = re.sub ("\.\.\.$", "", p)
if not p.endswith("/"):
@@ -1345,19 +1345,19 @@ class P4Sync(Command):
self.gitStream = importProcess.stdin
self.gitError = importProcess.stderr
- if self.revision:
- print "Doing initial import of %s from revision %s into %s" % (' '.join(self.depotPaths), self.revision, self.branch)
+ if revision:
+ print "Doing initial import of %s from revision %s into %s" % (' '.join(self.depotPaths), revision, self.branch)
details = { "user" : "git perforce import user", "time" : int(time.time()) }
details["desc"] = ("Initial import of %s from the state at revision %s"
- % (' '.join(self.depotPaths), self.revision))
- details["change"] = self.revision
+ % (' '.join(self.depotPaths), revision))
+ details["change"] = revision
newestRevision = 0
fileCnt = 0
for info in p4CmdList("files "
+ ' '.join(["%s...%s"
- % (p, self.revision)
+ % (p, revision)
for p in self.depotPaths])):
if info['code'] == 'error':