]> git.ipfire.org Git - thirdparty/git.git/commit - git-p4.py
git-p4: better error reporting when p4 fails
authorLuke Diamand <luke@diamand.org>
Fri, 8 Jun 2018 20:32:45 +0000 (21:32 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Jun 2018 21:46:09 +0000 (14:46 -0700)
commit0ef67acdd784852ee8e86dcdb653cc290c1a77a3
treeb6e744064b8fdde117c0e5f7e183f4f77fa7679c
parentb9d34db9a2108755ad01926cccc2a5007b5862a6
git-p4: better error reporting when p4 fails

Currently when p4 fails to run, git-p4 just crashes with an obscure
error message.

For example, if the P4 ticket has expired, you get:

  Error: Cannot locate perforce checkout of <path> in client view

This change checks whether git-p4 can talk to the Perforce server when
the first P4 operation is attempted, and tries to print a meaningful
error message if it fails.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py
t/t9833-errors.sh [new file with mode: 0755]