summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f9162f6)
raw | patch | inline | side by side (parent: f9162f6)
author | Simon Hausmann <simon@lst.de> | |
Thu, 17 May 2007 07:13:54 +0000 (09:13 +0200) | ||
committer | Simon Hausmann <simon@lst.de> | |
Thu, 17 May 2007 07:13:54 +0000 (09:13 +0200) |
import into remotes/p4 (yet!).
Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4 | patch | blob | history |
index 1f549b5c626325f3ed79d856a673b75d5fda3d21..e18f3cb8abe83912302cf108b20f96bb36eb4ad8 100755 (executable)
return True;
return False
+def parseRevision(ref):
+ return mypopen("git rev-parse %s" % ref).read()[:-1]
+
def system(cmd):
if os.system(cmd) != 0:
die("command failed: %s" % cmd)
self.previousDepotPath = ""
if len(self.branch) == 0:
- self.branch = "refs/remotes/p4"
+ self.branch = "p4"
if len(args) == 0:
if not gitBranchExists(self.branch) and gitBranchExists("origin"):
p4Change = int(p4Change) + 1
self.depotPath = self.previousDepotPath
self.changeRange = "@%s,#head" % p4Change
- self.initialParent = mypopen("git rev-parse %s" % self.branch).read()[:-1]
+ self.initialParent = parseRevision(self.branch)
if not self.silent:
print "Performing incremental import into %s git branch" % self.branch
endPos = caretIdx
self.rev = int(output[tagIdx + 9 : endPos]) + 1
self.changeRange = "@%s,#head" % self.rev
- self.initialParent = mypopen("git rev-parse %s" % self.branch).read()[:-1]
+ self.initialParent = parseRevision(self.branch)
except:
pass