summaryrefslogtreecommitdiff
path: root/t/t9809-git-p4-client-view.sh
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2012-04-30 00:57:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-04-30 23:00:04 (GMT)
commitb6ad6dcc3b0629d525abc9fe0882e1b0eb969e17 (patch)
tree9f00b39820b05293dd65097c8aaf5823c77654ea /t/t9809-git-p4-client-view.sh
parent0f224e5b73a73f37887eb7cb3e51073f889a3f9c (diff)
downloadgit-b6ad6dcc3b0629d525abc9fe0882e1b0eb969e17.zip
git-b6ad6dcc3b0629d525abc9fe0882e1b0eb969e17.tar.gz
git-b6ad6dcc3b0629d525abc9fe0882e1b0eb969e17.tar.bz2
git p4: fix writable file after rename or copy
The way rename works is with a "p4 integrate", optionally followed by a "p4 edit" if the change is not a 100% rename. Contents are generated by applying a patch, not doing a file system rename. Copy is similar. In this case, p4 does not fix the permissions back to read-only. Make sure this happens by calling "p4 sync -f". Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9809-git-p4-client-view.sh')
-rwxr-xr-xt/t9809-git-p4-client-view.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/t9809-git-p4-client-view.sh b/t/t9809-git-p4-client-view.sh
index 796b02c..43ed1fe 100755
--- a/t/t9809-git-p4-client-view.sh
+++ b/t/t9809-git-p4-client-view.sh
@@ -349,7 +349,8 @@ test_expect_success 'subdir clone, submit copy' '
) &&
(
cd "$cli" &&
- test_path_is_file dir1/file11a
+ test_path_is_file dir1/file11a &&
+ test ! -w dir1/file11a
)
'
@@ -368,14 +369,14 @@ test_expect_success 'subdir clone, submit rename' '
(
cd "$cli" &&
test_path_is_missing dir1/file13 &&
- test_path_is_file dir1/file13a
+ test_path_is_file dir1/file13a &&
+ test ! -w dir1/file13a
)
'
test_expect_success 'reinit depot' '
(
cd "$cli" &&
- p4 sync -f &&
rm files &&
p4 delete */* &&
p4 submit -d "delete all files" &&