summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 71bd9ba)
raw | patch | inline | side by side (parent: 71bd9ba)
author | Simon Hausmann <shausman@trolltech.com> | |
Fri, 18 May 2007 18:32:35 +0000 (20:32 +0200) | ||
committer | Simon Hausmann <shausman@trolltech.com> | |
Fri, 18 May 2007 18:32:35 +0000 (20:32 +0200) |
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
contrib/fast-import/git-p4 | patch | blob | history |
index a21d902ea9b04dd50916eff8c3ec264ac9b8cddf..2f3615bd7274f22c1132ec96670ba23f519f2d27 100755 (executable)
self.changeRange = ""
self.initialParent = ""
self.previousDepotPath = ""
- # importing into default remotes/p4/* layout?
- defaultImport = False
if self.syncWithOrigin and gitBranchExists("origin") and gitBranchExists("refs/remotes/p4/master"):
print "Syncing with origin first as requested by calling git fetch origin"
self.branch = "refs/remotes/p4/master"
if gitBranchExists("refs/heads/p4"):
system("git update-ref %s refs/heads/p4" % self.branch)
- system("git symbolic-ref refs/remotes/p4/HEAD refs/remotes/p4/master")
system("git branch -D p4");
- else:
- defaultImport = True
+ if not gitBranchExists("refs/remotes/p4/HEAD"):
+ system("git symbolic-ref refs/remotes/p4/HEAD %s" % self.branch)
if len(args) == 0:
if not gitBranchExists(self.branch) and gitBranchExists("origin"):
if not branch.startswith("refs"):
branch = "refs/heads/" + branch
system("git update-ref %s origin" % branch)
- if defaultImport:
- system("git symbolic-ref refs/remotes/p4/HEAD %s" % branch)
[self.previousDepotPath, p4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(self.branch))
if len(self.previousDepotPath) > 0 and len(p4Change) > 0: