aboutsummaryrefslogtreecommitdiff
path: root/t/lib-git-p4.sh
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2012-08-11 12:55:00 -0400
committerJunio C Hamano <gitster@pobox.com>2012-08-11 21:42:12 -0700
commitd2018293ca604544a79cd9390953ef0272a65078 (patch)
tree1600da3fd625608875fd50c1b069c10855dff265 /t/lib-git-p4.sh
parent61b472ed8b090a3e9240590c85041120a54dd268 (diff)
downloadgit-d2018293ca604544a79cd9390953ef0272a65078.tar.gz
git-d2018293ca604544a79cd9390953ef0272a65078.tar.xz
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>
Diffstat (limited to 't/lib-git-p4.sh')
-rw-r--r--t/lib-git-p4.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
index 2d753ab7e..d748c36df 100644
--- a/t/lib-git-p4.sh
+++ b/t/lib-git-p4.sh
@@ -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
+}