git-p4: test clone @all
Cloning a p4 depot by default generates a single commit. The use of the "@all" revision specifier instead tells git-p4 to import all commits. Check to make sure both these invocations work as expected. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pete Wyckoff committed
Mar 12, 2011 at 11:24 UTC
f0c9fe050474e0f2a947366a82a62efd6afbf2ce
1 file changed
+16
t/t9800-git-p4.sh
+16
@@ -37,11 +37,27 @@ test_expect_success 'add p4 files' '
37
echo file1 >file1 &&
38
p4 add file1 &&
39
p4 submit -d "file1" &&
40
+ echo file2 >file2 &&
41
+ p4 add file2 &&
42
+ p4 submit -d "file2" &&
43
cd "$TRASH_DIRECTORY"
44
'
45
46
test_expect_success 'basic git-p4 clone' '
47
"$GITP4" clone --dest="$git" //depot &&
48
+ cd "$git" &&
49
+ git log --oneline >lines &&
50
+ test_line_count = 1 lines &&
51
+ cd .. &&
52
+ rm -rf "$git" && mkdir "$git"
53
+'
54
+
55
+test_expect_success 'git-p4 clone @all' '
56
+ "$GITP4" clone --dest="$git" //depot@all &&
57
+ cd "$git" &&
58
+ git log --oneline >lines &&
59
+ test_line_count = 2 lines &&
60
+ cd .. &&
61
rm -rf "$git" && mkdir "$git"
62
'
63