From afdca0aff43747ce985a4caf655e8b3363dea370 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 1 Sep 2021 10:42:50 -0400 Subject: [PATCH] skip test_readonly on windows drop vs readonly repo failed (transcript follows) drop foo failed git-annex: .git\annex\objects\6cd\e82\SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77\SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77: DeleteFile "\\\\?\\C:\\Users\\runneradmin\\.t\\tmprepo3\\.git\\annex\\objects\\6cd\\e82\\SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77\\SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77": permission denied (Access is denied.) This is a bit surprising, it seems that chmod -R -w on windows actually had some effect. But also, on Windows lockContentShared has to write to a lock file, so it cannot work in a readonly repo. So git-annex cannot support readonly repos on Windows. Sponsored-by: Dartmouth College's Datalad project --- Test.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Test.hs b/Test.hs index e8a5d83edd..ac78a6b2eb 100644 --- a/Test.hs +++ b/Test.hs @@ -431,6 +431,7 @@ test_add_extras = intmpclonerepo $ do test_readonly :: Assertion test_readonly = +#ifndef mingw32_HOST_OS withtmpclonerepo $ \r1 -> withtmpclonerepo $ \r2 -> do pair r1 r2 @@ -445,6 +446,11 @@ test_readonly = git_annex "get" [annexedfile, "--from", "r1"] "get from readonly repo" git "remote" ["rm", "origin"] "remote rm" git_annex "drop" [annexedfile] "drop vs readonly repo" +#else + -- This test does not work on Windows, and it doesn't make sense to + -- try to support this on Windows anyway. + return () +#endif test_ignore_deleted_files :: Assertion test_ignore_deleted_files = intmpclonerepo $ do