t9801: git-p4: check ignore files with client spec
This test confirms that a file can be ignored during git p4 sync if if is excluded in P4 client specification. Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Vitor Antunes committed
Jul 19, 2013 at 00:04 UTC
7c8ce4ed32aec3b86a271c2661ad9dfb0084c3f9
1 file changed
+20
-3
t/t9801-git-p4-branch.sh
+20
-3
@@ -469,9 +469,11 @@ test_expect_success 'use-client-spec detect-branches skips branches setup' '
469
View: //depot/usecs/b1/... //depot/usecs/b3/...
470
EOF
471
472
- echo b3/b3-file3 >b3/b3-file3 &&
473
- p4 add b3/b3-file3 &&
474
- p4 submit -d "b3/b3-file3"
472
+ echo b3/b3-file3_1 >b3/b3-file3_1 &&
473
+ echo b3/b3-file3_2 >b3/b3-file3_2 &&
474
+ p4 add b3/b3-file3_1 &&
475
+ p4 add b3/b3-file3_2 &&
476
+ p4 submit -d "b3/b3-file3_1 b3/b3-file3_2"
477
)
478
'
479
@@ -487,6 +489,21 @@ test_expect_success 'use-client-spec detect-branches skips branches' '
489
)
490
'
491
492
+test_expect_success 'use-client-spec detect-branches skips files in branches' '
493
+ client_view "//depot/usecs/... //client/..." \
494
+ "-//depot/usecs/b3/b3-file3_1 //client/b3/b3-file3_1" &&
495
+ test_when_finished cleanup_git &&
496
+ test_create_repo "$git" &&
497
+ (
498
+ cd "$git" &&
499
+ git p4 sync --detect-branches --use-client-spec //depot/usecs@all &&
500
+ git checkout -b master p4/usecs/b3 &&
501
+ test_path_is_file b1-file1 &&
502
+ test_path_is_file b3-file3_2 &&
503
+ test_path_is_missing b3-file3_1
504
+ )
505
+'
506
+
507
test_expect_success 'kill p4d' '
508
kill_p4d
509
'