summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-05-21 08:44:16 +0200
committerLibravatar Simon Hausmann <simon@lst.de>2007-05-21 08:44:16 +0200
commit33be3e6550c7051c3ac4bc624c7dacfad6974b4f (patch)
tree5106650e19a3cc32c432f4ce8b51ced8ab18ff53
parentImproved output for multi branch imports and noted another little todo item (diff)
downloadtgif-33be3e6550c7051c3ac4bc624c7dacfad6974b4f.tar.xz
Fix conversion from old style heads/p4 to remotes/p4/master
Signed-off-by: Simon Hausmann <simon@lst.de>
-rwxr-xr-xcontrib/fast-import/git-p411
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index beb6529b44..7489c91081 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -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
@@ -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