Drop the $GITP4 variable that was used to specify the script in
contrib/fast-import/. The command is called "git p4" now, not
"git-p4".
Note that configuration variables will remain in a section called
"git-p4".
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Pete Wyckoff13 years agocommitted byJunio C Hamano
@ -134,7 +134,7 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
@@ -134,7 +134,7 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
@ -151,8 +151,8 @@ test_expect_success 'add p4 files with wildcards in the names' '
@@ -151,8 +151,8 @@ test_expect_success 'add p4 files with wildcards in the names' '
# Test username support, submitting as bob, who lacks admin rights. Should
# not submit change to p4 (git diff should show deltas).
test_expect_success 'refuse to preserve users without perms' '
"$GITP4" clone --dest="$git" //depot &&
git p4 clone --dest="$git" //depot &&
test_when_finished cleanup_git &&
(
cd "$git" &&
@ -236,14 +236,14 @@ test_expect_success 'refuse to preserve users without perms' '
@@ -236,14 +236,14 @@ test_expect_success 'refuse to preserve users without perms' '
git commit --author "Alice <alice@localhost>" -m "perms: a change by alice" file1 &&
P4EDITOR=touch P4USER=bob P4PASSWD=secret &&
export P4EDITOR P4USER P4PASSWD &&
test_must_fail "$GITP4" commit --preserve-user &&
test_must_fail git p4 commit --preserve-user &&
! git diff --exit-code HEAD..p4/master
)
'
# What happens with unknown author? Without allowMissingP4Users it should fail.
test_expect_success 'preserve user where author is unknown to p4' '
"$GITP4" clone --dest="$git" //depot &&
git p4 clone --dest="$git" //depot &&
test_when_finished cleanup_git &&
(
cd "$git" &&
@ -254,24 +254,24 @@ test_expect_success 'preserve user where author is unknown to p4' '
@@ -254,24 +254,24 @@ test_expect_success 'preserve user where author is unknown to p4' '
git commit --author "Charlie <charlie@localhost>" -m "preserve: a change by charlie" file1 &&
P4EDITOR=touch P4USER=alice P4PASSWD=secret &&
export P4EDITOR P4USER P4PASSWD &&
test_must_fail "$GITP4" commit --preserve-user &&
test_must_fail git p4 commit --preserve-user &&
! git diff --exit-code HEAD..p4/master &&
echo "$0: repeat with allowMissingP4Users enabled" &&
git config git-p4.allowMissingP4Users true &&
git config git-p4.preserveUser true &&
"$GITP4" commit &&
git p4 commit &&
git diff --exit-code HEAD..p4/master &&
p4_check_commit_author file1 alice
)
'
# If we're *not* using --preserve-user, git-p4 should warn if we're submitting
# If we're *not* using --preserve-user, git p4 should warn if we're submitting
# changes that are not all ours.
# Test: user in p4 and user unknown to p4.
# Test: warning disabled and user is the same.
test_expect_success 'not preserving user with mixed authorship' '
"$GITP4" clone --dest="$git" //depot &&
git p4 clone --dest="$git" //depot &&
test_when_finished cleanup_git &&
(
cd "$git" &&
@ -281,20 +281,20 @@ test_expect_success 'not preserving user with mixed authorship' '
@@ -281,20 +281,20 @@ test_expect_success 'not preserving user with mixed authorship' '
grep "git author derek@localhost does not match" &&
make_change_by_user usernamefile3 Charlie charlie@localhost &&
"$GITP4" commit |\
git p4 commit |\
grep "git author charlie@localhost does not match" &&
make_change_by_user usernamefile3 alice alice@localhost &&
"$GITP4" commit |\
git p4 commit |\
test_must_fail grep "git author.*does not match" &&
git config git-p4.skipUserNameCheck true &&
make_change_by_user usernamefile3 Charlie charlie@localhost &&
"$GITP4" commit |\
git p4 commit |\
test_must_fail grep "git author.*does not match" &&
p4_check_commit_author usernamefile3 alice
@ -313,7 +313,7 @@ test_expect_success 'initial import time from top change time' '
@@ -313,7 +313,7 @@ test_expect_success 'initial import time from top change time' '
@ -331,7 +331,7 @@ test_expect_success 'initial import time from top change time' '
@@ -331,7 +331,7 @@ test_expect_success 'initial import time from top change time' '
# Repeat, this time with a smaller threshold and confirm that the rename is
test_expect_success 'Add keywords in git which match the default p4 values' '
test_when_finished cleanup_git &&
"$GITP4" clone --dest="$git" //depot &&
git p4 clone --dest="$git" //depot &&
(
cd "$git" &&
echo "NewKW: \$Revision\$" >>kwfile1.c &&
@ -309,7 +309,7 @@ test_expect_success 'Add keywords in git which match the default p4 values' '
@@ -309,7 +309,7 @@ test_expect_success 'Add keywords in git which match the default p4 values' '
git commit -m "Adding RCS keywords in git" &&
git config git-p4.skipSubmitEdit true &&
git config git-p4.attemptRCSCleanup true &&
"$GITP4" submit
git p4 submit
) &&
(
cd "$cli" &&
@ -325,7 +325,7 @@ test_expect_success 'Add keywords in git which match the default p4 values' '
@@ -325,7 +325,7 @@ test_expect_success 'Add keywords in git which match the default p4 values' '
#
test_expect_failure 'Add keywords in git which do not match the default p4 values' '
test_when_finished cleanup_git &&
"$GITP4" clone --dest="$git" //depot &&
git p4 clone --dest="$git" //depot &&
(
cd "$git" &&
echo "NewKW2: \$Revision:1\$" >>kwfile1.c &&
@ -333,7 +333,7 @@ test_expect_failure 'Add keywords in git which do not match the default p4 value
@@ -333,7 +333,7 @@ test_expect_failure 'Add keywords in git which do not match the default p4 value