Skip to content

Commit

Permalink
Fix conversion from old style heads/p4 to remotes/p4/master
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Hausmann <simon@lst.de>
  • Loading branch information
Simon Hausmann committed May 21, 2007
1 parent 341dc1c commit 33be3e6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -730,11 +730,6 @@ class P4Sync(Command):
self.knownBranches = {}
self.initialParents = {}

self.listExistingP4GitBranches()
if len(self.p4BranchesInGit) > 1 and not self.silent:
print "Importing from/into multiple branches"
self.detectBranches = True

if self.syncWithOrigin and gitBranchExists("origin") and gitBranchExists("refs/remotes/p4/master") and not self.detectBranches:
### needs to be ported to multi branch import

Expand All @@ -760,6 +755,12 @@ class P4Sync(Command):
if not gitBranchExists("refs/remotes/p4/HEAD"):
system("git symbolic-ref refs/remotes/p4/HEAD %s" % self.branch)

# this needs to be called after the conversion from heads/p4 to remotes/p4/master
self.listExistingP4GitBranches()
if len(self.p4BranchesInGit) > 1 and not self.silent:
print "Importing from/into multiple branches"
self.detectBranches = True

if len(args) == 0:
if not gitBranchExists(self.branch) and gitBranchExists("origin") and not self.detectBranches:
### needs to be ported to multi branch import
Expand Down

0 comments on commit 33be3e6

Please sign in to comment.