Skip to content

Commit

Permalink
git-p4: better message for "git-p4 sync" when not cloned
Browse files Browse the repository at this point in the history
A common error is to do "git-p4 sync" in a repository that
was not initialized by "git-p4 clone".  There will be no
p4 refs.  The error message in this case is a traceback
for an assertion, which is confusing.

Change it instead to explain the likely problem.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-By: Tor Arvid Lund <torarvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Pete Wyckoff authored and Junio C Hamano committed Feb 21, 2011
1 parent d88e707 commit e32e00d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -1676,6 +1676,8 @@ class P4Sync(Command):

changes.sort()
else:
if 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),
self.changeRange)
Expand Down

0 comments on commit e32e00d

Please sign in to comment.