Added missing "self"s to make the script evaluate correctly.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Simon Hausmann committed
Mar 20, 2007 at 20:59 UTC
0828ab140360c4c831e112f8d244923a7f032e74
1 file changed
+9
-9
contrib/fast-import/git-p4.py
+9
-9
@@ -489,9 +489,9 @@ class GitSync(Command):
489
self.committedChanges.add(int(details["change"]))
490
committer = ""
491
if author in self.users:
492
- committer = "%s %s %s" % (self.users[author], epoch, tz)
492
+ committer = "%s %s %s" % (self.users[author], epoch, self.tz)
493
else:
494
- committer = "%s <a@b> %s %s" % (author, epoch, tz)
494
+ committer = "%s <a@b> %s %s" % (author, epoch, self.tz)
495
496
self.gitStream.write("committer %s\n" % committer)
497
@@ -735,10 +735,10 @@ class GitSync(Command):
735
except:
736
pass
737
738
- tz = - time.timezone / 36
739
- tzsign = ("%s" % tz)[0]
738
+ self.tz = - time.timezone / 36
739
+ tzsign = ("%s" % self.tz)[0]
740
if tzsign != '+' and tzsign != '-':
741
- tz = "+" + ("%s" % tz)
741
+ self.tz = "+" + ("%s" % self.tz)
742
743
self.gitOutput, self.gitStream, self.gitError = popen2.popen3("git-fast-import")
744
@@ -774,7 +774,7 @@ class GitSync(Command):
774
else:
775
changes = []
776
777
- if len(changesFile) > 0:
777
+ if len(self.changesFile) > 0:
778
output = open(self.changesFile).readlines()
779
changeSet = Set()
780
for line in output:
@@ -794,7 +794,7 @@ class GitSync(Command):
794
changes.reverse()
795
796
if len(changes) == 0:
797
- if not silent:
797
+ if not self.silent:
798
print "no changes to import!"
799
sys.exit(1)
800
@@ -802,7 +802,7 @@ class GitSync(Command):
802
for change in changes:
803
description = p4Cmd("describe %s" % change)
804
805
- if not silent:
805
+ if not self.silent:
806
sys.stdout.write("\rimporting revision %s (%s%%)" % (change, cnt * 100 / len(changes)))
807
sys.stdout.flush()
808
cnt = cnt + 1
@@ -841,7 +841,7 @@ class GitSync(Command):
841
merged = "refs/heads/" + merged
842
self.commit(description, files, branch, branchPrefix, parent, merged)
843
else:
844
- self.commit(description, files, branch, globalPrefix, initialParent)
844
+ self.commit(description, files, self.branch, self.globalPrefix, self.initialParent)
845
self.initialParent = ""
846
except IOError:
847
print self.gitError.read()