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

git-p4: fix sync new branch regression

e32e00dc (git-p4: better message for "git-p4 sync" when not
cloned, 2011-02-19) broke another use case, that of using
"git-p4 sync" to import a new branch into an existing repository.

Refine the fix again, on top of the fix in ac34efcf.
Reported-by: NMichael Horowitz <michael.horowitz@ieee.org>
Signed-off-by: NPete Wyckoff <pw@padd.com>
Tested-by: NMichael Horowitz <michael.horowitz@ieee.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f0c9fe05
......@@ -1694,7 +1694,9 @@ class P4Sync(Command):
changes.sort()
else:
if not isinstance(self, P4Clone) and not self.p4BranchesInGit:
# catch "git-p4 sync" with no new branches, in a repo that
# does not have any existing git-p4 branches
if len(args) == 0 and not self.p4BranchesInGit:
die("No remote p4 branches. Perhaps you never did \"git p4 clone\" in here.");
if self.verbose:
print "Getting p4 changes for %s...%s" % (', '.join(self.depotPaths),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册