Fix conversion from old style heads/p4 to remotes/p4/master
Signed-off-by: Simon Hausmann <simon@lst.de>
Simon Hausmann committed
May 21, 2007 at 08:44 UTC
33be3e6550c7051c3ac4bc624c7dacfad6974b4f
1 file changed
+6
-5
contrib/fast-import/git-p4
+6
-5
@@ -730,11 +730,6 @@ class P4Sync(Command):
730
self.knownBranches = {}
731
self.initialParents = {}
732
733
- self.listExistingP4GitBranches()
734
- if len(self.p4BranchesInGit) > 1 and not self.silent:
735
- print "Importing from/into multiple branches"
736
- self.detectBranches = True
737
-
733
if self.syncWithOrigin and gitBranchExists("origin") and gitBranchExists("refs/remotes/p4/master") and not self.detectBranches:
734
### needs to be ported to multi branch import
735
@@ -760,6 +755,12 @@ class P4Sync(Command):
755
if not gitBranchExists("refs/remotes/p4/HEAD"):
756
system("git symbolic-ref refs/remotes/p4/HEAD %s" % self.branch)
757
758
+ # this needs to be called after the conversion from heads/p4 to remotes/p4/master
759
+ self.listExistingP4GitBranches()
760
+ if len(self.p4BranchesInGit) > 1 and not self.silent:
761
+ print "Importing from/into multiple branches"
762
+ self.detectBranches = True
763
+
764
if len(args) == 0:
765
if not gitBranchExists(self.branch) and gitBranchExists("origin") and not self.detectBranches:
766
### needs to be ported to multi branch import