summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <shausman@trolltech.com>2007-05-18 20:32:35 +0200
committerLibravatar Simon Hausmann <shausman@trolltech.com>2007-05-18 20:32:35 +0200
commit05094f987c2f141ec9b873ad6d6303b0aca173a4 (patch)
tree11a087fbaeb8a6d4c1f37bbd711e7233ede7fe00
parentRemoved todo item that is implemented :) (diff)
downloadtgif-05094f987c2f141ec9b873ad6d6303b0aca173a4.tar.xz
Fix branch setup after initial clone.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
-rwxr-xr-xcontrib/fast-import/git-p49
1 files changed, 2 insertions, 7 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index a21d902ea9..2f3615bd72 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -828,8 +828,6 @@ class P4Sync(Command):
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"
@@ -850,10 +848,9 @@ class P4Sync(Command):
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"):
@@ -863,8 +860,6 @@ class P4Sync(Command):
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: