@matheusbsbs / matheus-bagliano / commits / df450923a2
Fork 0

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).

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>

Simon Hausmann committed Jun 8, 2007 at 08:49 UTC df450923a2a08c50976f2d241a1c4992cf03b3a7
1 file changed +5 -5
contrib/fast-import/git-p4
+5 -5
@@ -907,10 +907,6 @@ class P4Sync(Command):
907 return p [p.strip().rfind("/") + 1:]
908
909 def getBranchMapping(self):
910 -
911 - ## FIXME - what's a P4 projectName ?
912 - self.projectName = self.guessProjectName()
913 -
910 for info in p4CmdList("branches"):
911 details = p4Cmd("branch -o %s" % info["branch"])
912 viewIdx = 0
@@ -1141,7 +1137,11 @@ class P4Sync(Command):
1137 self.getLabels();
1138
1139 if self.detectBranches:
1144 - self.getBranchMapping();
1140 + ## FIXME - what's a P4 projectName ?
1141 + self.projectName = self.guessProjectName()
1142 +
1143 + if not self.hasOrigin:
1144 + self.getBranchMapping();
1145 if self.verbose:
1146 print "p4-git branches: %s" % self.p4BranchesInGit
1147 print "initial parents: %s" % self.initialParents