git-p4: failing test case for skipping changes with multiple depots

James Farwell reported that with multiple depots git-p4 would skip changes. http://article.gmane.org/gmane.comp.version-control.git/282297 Add a failing test case demonstrating the problem. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Luke Diamand committed Dec 13, 2015 at 20:07 UTC 785e70f467aea9e5446bba901e7d412ae161c088
1 file changed +27 -1
t/t9818-git-p4-block.sh
+27 -1
@@ -84,7 +84,7 @@ p4_add_file() {
84 (cd "$cli" &&
85 >$1 &&
86 p4 add $1 &&
87 - p4 submit -d "Added a file" $1
87 + p4 submit -d "Added file $1" $1
88 )
89 }
90
@@ -112,6 +112,32 @@ test_expect_success 'Syncing files' '
112 )
113 '
114
115 +# Handling of multiple depot paths:
116 +# git p4 clone //depot/pathA //depot/pathB
117 +#
118 +test_expect_success 'Create a repo with multiple depot paths' '
119 + client_view "//depot/pathA/... //client/pathA/..." \
120 + "//depot/pathB/... //client/pathB/..." &&
121 + mkdir -p "$cli/pathA" "$cli/pathB" &&
122 + for p in pathA pathB
123 + do
124 + for i in $(test_seq 1 10)
125 + do
126 + p4_add_file "$p/file$p$i"
127 + done
128 + done
129 +'
130 +
131 +test_expect_failure 'Clone repo with multiple depot paths' '
132 + (
133 + cd "$git" &&
134 + git p4 clone --changes-block-size=4 //depot/pathA@all //depot/pathB@all \
135 + --destination=dest &&
136 + ls -1 dest >log &&
137 + test_line_count = 20 log
138 + )
139 +'
140 +
141 test_expect_success 'kill p4d' '
142 kill_p4d
143 '