Skip to content

Commit 785e70f

Browse files
luked99gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4b9ab0e commit 785e70f

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

t/t9818-git-p4-block.sh

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ p4_add_file() {
8484
(cd "$cli" &&
8585
>$1 &&
8686
p4 add $1 &&
87-
p4 submit -d "Added a file" $1
87+
p4 submit -d "Added file $1" $1
8888
)
8989
}
9090

@@ -112,6 +112,32 @@ test_expect_success 'Syncing files' '
112112
)
113113
'
114114

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+
115141
test_expect_success 'kill p4d' '
116142
kill_p4d
117143
'

0 commit comments

Comments
 (0)