diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-01-27 18:45:41 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-01-27 18:45:41 (GMT) |
commit | 523f0a25b91c34ec817bc5757f52f365f497e3bb (patch) | |
tree | 09d5b98d64030b0e7f97c2e5536b466adcfa4c32 /t/lib-git-p4.sh | |
parent | 33d4669aaa658f3e35f88748ed2db51c84203f62 (diff) | |
parent | f84cb684634f50df7adde7f52c25f049d257f0e3 (diff) | |
download | git-523f0a25b91c34ec817bc5757f52f365f497e3bb.zip git-523f0a25b91c34ec817bc5757f52f365f497e3bb.tar.gz git-523f0a25b91c34ec817bc5757f52f365f497e3bb.tar.bz2 |
Merge branch 'pw/git-p4'
Various "git p4" updates.
* pw/git-p4:
git p4 doc: use two-line style for options with multiple spellings
git p4 test: examine behavior with locked (+l) files
git p4: fix an error message when "p4 where" fails
git p4: handle files with wildcards when doing RCS scrubbing
git p4 test: do not pollute /tmp
git p4 test: run as user "author"
git p4 test: is_cli_file_writeable succeeds
git p4 test: explicitly check p4 wildcard delete
git p4: work around p4 bug that causes empty symlinks
git p4 test: ensure p4 symlink parsing works
git p4 test: wildcards are supported
Diffstat (limited to 't/lib-git-p4.sh')
-rw-r--r-- | t/lib-git-p4.sh | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh index ccd918e..5aa8adc 100644 --- a/t/lib-git-p4.sh +++ b/t/lib-git-p4.sh @@ -47,15 +47,22 @@ P4DPORT=$((10669 + ($testid - $git_p4_test_start))) P4PORT=localhost:$P4DPORT P4CLIENT=client -P4EDITOR=: +P4USER=author +P4EDITOR=true unset P4CHARSET -export P4PORT P4CLIENT P4EDITOR P4CHARSET +export P4PORT P4CLIENT P4USER P4EDITOR P4CHARSET db="$TRASH_DIRECTORY/db" cli="$TRASH_DIRECTORY/cli" git="$TRASH_DIRECTORY/git" pidfile="$TRASH_DIRECTORY/p4d.pid" +# git p4 submit generates a temp file, which will +# not get cleaned up if the submission fails. Don't +# clutter up /tmp on the test machine. +TMPDIR="$TRASH_DIRECTORY" +export TMPDIR + start_p4d() { mkdir -p "$db" "$cli" "$git" && rm -f "$pidfile" && @@ -96,12 +103,24 @@ start_p4d() { return 1 fi + # build a p4 user so author@example.com has an entry + p4_add_user author + # build a client client_view "//depot/... //client/..." && return 0 } +p4_add_user() { + name=$1 && + p4 user -f -i <<-EOF + User: $name + Email: $name@example.com + FullName: Dr. $name + EOF +} + kill_p4d() { pid=$(cat "$pidfile") # it had better exist for the first kill |