summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSimon Hausmann <simon@lst.de>2007-06-08 08:49:22 +0200
committerSimon Hausmann <simon@lst.de>2007-06-08 08:49:22 +0200
commitdf450923a2a08c50976f2d241a1c4992cf03b3a7 (patch)
treef9505140471da98436ba6d3f99f7ed2cc9973a9b /contrib
parenta3fdd57901bfe1014c4a48e13815d80f1f0e8577 (diff)
downloadgit-df450923a2a08c50976f2d241a1c4992cf03b3a7.tar.gz
Only get the expensive branch mapping from the p4 server when not
syncing with the help of an origin remote (which we instead then use to get new branches from). Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p410
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index efec0be32c..36fe69a795 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -907,10 +907,6 @@ class P4Sync(Command):
return p [p.strip().rfind("/") + 1:]
def getBranchMapping(self):
-
- ## FIXME - what's a P4 projectName ?
- self.projectName = self.guessProjectName()
-
for info in p4CmdList("branches"):
details = p4Cmd("branch -o %s" % info["branch"])
viewIdx = 0
@@ -1141,7 +1137,11 @@ class P4Sync(Command):
self.getLabels();
if self.detectBranches:
- self.getBranchMapping();
+ ## FIXME - what's a P4 projectName ?
+ self.projectName = self.guessProjectName()
+
+ if not self.hasOrigin:
+ self.getBranchMapping();
if self.verbose:
print "p4-git branches: %s" % self.p4BranchesInGit
print "initial parents: %s" % self.initialParents