summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc52403)
raw | patch | inline | side by side (parent: dc52403)
author | Simon Hausmann <shausman@trolltech.com> | |
Mon, 21 May 2007 08:05:30 +0000 (10:05 +0200) | ||
committer | Simon Hausmann <shausman@trolltech.com> | |
Mon, 21 May 2007 08:05:30 +0000 (10:05 +0200) |
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
contrib/fast-import/git-p4 | patch | blob | history |
index 73da5d2b27bd8455446f47da1386bbf575dd518f..35a513fcb8bab6e7c51d9963138f00e09b58f4b6 100755 (executable)
self.knownBranches = {}
self.initialParents = {}
+ createP4HeadRef = False;
+
if self.syncWithOrigin and gitBranchExists("origin") and gitBranchExists("refs/remotes/p4/master") and not self.detectBranches:
### needs to be ported to multi branch import
if gitBranchExists("refs/heads/p4"):
system("git update-ref %s refs/heads/p4" % self.branch)
system("git branch -D p4");
+ # create it /after/ importing, when master exists
if not gitBranchExists("refs/remotes/p4/HEAD"):
- system("git symbolic-ref refs/remotes/p4/HEAD %s" % self.branch)
+ createP4HeadRef = True
# this needs to be called after the conversion from heads/p4 to remotes/p4/master
self.listExistingP4GitBranches()
self.gitOutput.close()
self.gitError.close()
+ if createP4HeadRef:
+ system("git symbolic-ref refs/remotes/p4/HEAD %s" % self.branch)
+
return True
class P4Rebase(Command):