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 коммит произвёл Junio C Hamano
Родитель 61b472ed8b
Коммит d2018293ca
2 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -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
}

Просмотреть файл

@ -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".