summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5c4153e)
raw | patch | inline | side by side (parent: 5c4153e)
author | Simon Hausmann <simon@lst.de> | |
Thu, 17 May 2007 07:02:45 +0000 (09:02 +0200) | ||
committer | Simon Hausmann <simon@lst.de> | |
Thu, 17 May 2007 07:09:05 +0000 (09:09 +0200) |
it's creating a new branch from itself. It's a sensible error in general but
in the case of incremental imports we have to apply force :)
Signed-off-by: Simon Hausmann <simon@lst.de>
in the case of incremental imports we have to apply force :)
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4 | patch | blob | history |
index 239304857d894e3612d71d90185606955bfa5d22..1f549b5c626325f3ed79d856a673b75d5fda3d21 100755 (executable)
self.previousDepotPath = ""
if len(self.branch) == 0:
- self.branch = "p4"
+ self.branch = "refs/remotes/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 = self.branch
+ self.initialParent = mypopen("git rev-parse %s" % self.branch).read()[:-1]
if not self.silent:
print "Performing incremental import into %s git branch" % self.branch
- self.branch = "refs/heads/" + self.branch
+ if not self.branch.startswith("refs/"):
+ self.branch = "refs/heads/" + self.branch
if len(self.depotPath) != 0:
self.depotPath = self.depotPath[:-1]