提交 991a2de4 编写于 作者: P Pete Wyckoff 提交者: Junio C Hamano

git p4: rearrange and simplify hasOrigin handling

Signed-off-by: NPete Wyckoff <pw@padd.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 46738bd7
......@@ -2748,23 +2748,23 @@ def run(self, args):
self.changeRange = ""
self.initialParent = ""
self.previousDepotPaths = []
self.hasOrigin = False
# map from branch depot path to parent branch
self.knownBranches = {}
self.initialParents = {}
self.hasOrigin = originP4BranchesExist()
if not self.syncWithOrigin:
self.hasOrigin = False
if self.importIntoRemotes:
self.refPrefix = "refs/remotes/p4/"
else:
self.refPrefix = "refs/heads/p4/"
if self.syncWithOrigin and self.hasOrigin:
if not self.silent:
print "Syncing with origin first by calling git fetch origin"
system("git fetch origin")
if self.syncWithOrigin:
self.hasOrigin = originP4BranchesExist()
if self.hasOrigin:
if not self.silent:
print 'Syncing with origin first, using "git fetch origin"'
system("git fetch origin")
if len(self.branch) == 0:
self.branch = self.refPrefix + "master"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册