Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Added missing "self"s to make the script evaluate correctly.
author
Simon Hausmann
<hausmann@kde.org>
Tue, 20 Mar 2007 19:59:30 +0000
(20:59 +0100)
committer
Simon Hausmann
<hausmann@kde.org>
Tue, 20 Mar 2007 19:59:30 +0000
(20:59 +0100)
Signed-off-by: Simon Hausmann <hausmann@kde.org>
contrib/fast-import/git-p4.py
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
b984733
)
diff --git
a/contrib/fast-import/git-p4.py
b/contrib/fast-import/git-p4.py
index 477238fa1c1017bfd90d5084e28962c310db03cb..8cb63f9540b6e5de030667df01e9f419f0102e39 100755
(executable)
--- a/
contrib/fast-import/git-p4.py
+++ b/
contrib/fast-import/git-p4.py
@@
-489,9
+489,9
@@
def commit(self, details, files, branch, branchPrefix, parent, merged = ""):
self.committedChanges.add(int(details["change"]))
committer = ""
if author in self.users:
self.committedChanges.add(int(details["change"]))
committer = ""
if author in self.users:
- committer = "%s %s %s" % (self.users[author], epoch, tz)
+ committer = "%s %s %s" % (self.users[author], epoch,
self.
tz)
else:
else:
- committer = "%s <a@b> %s %s" % (author, epoch, tz)
+ committer = "%s <a@b> %s %s" % (author, epoch,
self.
tz)
self.gitStream.write("committer %s\n" % committer)
self.gitStream.write("committer %s\n" % committer)
@@
-735,10
+735,10
@@
def run(self, args):
except:
pass
except:
pass
- tz = - time.timezone / 36
- tzsign = ("%s" % tz)[0]
+
self.
tz = - time.timezone / 36
+ tzsign = ("%s" %
self.
tz)[0]
if tzsign != '+' and tzsign != '-':
if tzsign != '+' and tzsign != '-':
-
tz = "+" + ("%s" %
tz)
+
self.tz = "+" + ("%s" % self.
tz)
self.gitOutput, self.gitStream, self.gitError = popen2.popen3("git-fast-import")
self.gitOutput, self.gitStream, self.gitError = popen2.popen3("git-fast-import")
@@
-774,7
+774,7
@@
def run(self, args):
else:
changes = []
else:
changes = []
- if len(changesFile) > 0:
+ if len(
self.
changesFile) > 0:
output = open(self.changesFile).readlines()
changeSet = Set()
for line in output:
output = open(self.changesFile).readlines()
changeSet = Set()
for line in output:
@@
-794,7
+794,7
@@
def run(self, args):
changes.reverse()
if len(changes) == 0:
changes.reverse()
if len(changes) == 0:
- if not silent:
+ if not s
elf.s
ilent:
print "no changes to import!"
sys.exit(1)
print "no changes to import!"
sys.exit(1)
@@
-802,7
+802,7
@@
def run(self, args):
for change in changes:
description = p4Cmd("describe %s" % change)
for change in changes:
description = p4Cmd("describe %s" % change)
- if not silent:
+ if not s
elf.s
ilent:
sys.stdout.write("\rimporting revision %s (%s%%)" % (change, cnt * 100 / len(changes)))
sys.stdout.flush()
cnt = cnt + 1
sys.stdout.write("\rimporting revision %s (%s%%)" % (change, cnt * 100 / len(changes)))
sys.stdout.flush()
cnt = cnt + 1
@@
-841,7
+841,7
@@
def run(self, args):
merged = "refs/heads/" + merged
self.commit(description, files, branch, branchPrefix, parent, merged)
else:
merged = "refs/heads/" + merged
self.commit(description, files, branch, branchPrefix, parent, merged)
else:
- self.commit(description, files,
branch, globalPrefix,
initialParent)
+ self.commit(description, files,
self.branch, self.globalPrefix, self.
initialParent)
self.initialParent = ""
except IOError:
print self.gitError.read()
self.initialParent = ""
except IOError:
print self.gitError.read()