git p4 test: move client_view() function to library

This code will be useful in --detect-branches --use-client-spec tests.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Pete Wyckoff 2012-08-11 12:55:00 -04:00 committed by Junio C Hamano
parent 61b472ed8b
commit d2018293ca
2 changed files with 17 additions and 17 deletions

View file

@ -115,3 +115,20 @@ marshal_dump() {
EOF
"$PYTHON_PATH" "$TRASH_DIRECTORY/marshal-dump.py"
}
#
# Construct a client with this list of View lines
#
client_view() {
(
cat <<-EOF &&
Client: client
Description: client
Root: $cli
View:
EOF
for arg ; do
printf "\t$arg\n"
done
) | p4 client -i
}

View file

@ -8,23 +8,6 @@ test_expect_success 'start p4d' '
start_p4d
'
#
# Construct a client with this list of View lines
#
client_view() {
(
cat <<-EOF &&
Client: client
Description: client
Root: $cli
View:
EOF
for arg ; do
printf "\t$arg\n"
done
) | p4 client -i
}
#
# Verify these files exist, exactly. Caller creates
# a list of files in file "files".