summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Remote/Git.hs18
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/Won__39__t_drop_files__44___even_though_remote_annexes_have_at_least_numcopies.mdwn2
3 files changed, 12 insertions, 10 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index b1f83b572..a857d5c14 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -228,17 +228,14 @@ inAnnex r key
| Git.repoIsUrl r = checkremote
| otherwise = checklocal
where
- checkhttp headers = liftIO $ go undefined $ keyUrls r key
- where
- go e [] = return $ Left e
- go _ (u:us) = do
- res <- catchMsgIO $
- Url.check u headers (keySize key)
- case res of
- Left e -> go e us
- v -> return v
+ checkhttp headers = do
+ showchecking
+ liftIO $ ifM (anyM (\u -> Url.check u headers (keySize key)) (keyUrls r key))
+ ( return $ Right True
+ , return $ Left "not found"
+ )
checkremote = do
- showAction $ "checking " ++ Git.repoDescribe r
+ showchecking
onRemote r (check, unknown) "inannex" [Param (key2file key)] []
where
check c p = dispatch <$> safeSystem c p
@@ -253,6 +250,7 @@ inAnnex r key
dispatch (Right (Just b)) = Right b
dispatch (Right Nothing) = unknown
unknown = Left $ "unable to check " ++ Git.repoDescribe r
+ showchecking = showAction $ "checking " ++ Git.repoDescribe r
{- Runs an action on a local repository inexpensively, by making an annex
- monad using that repository. -}
diff --git a/debian/changelog b/debian/changelog
index 832b42d45..b74fb33c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ git-annex (4.20130710) UNRELEASED; urgency=low
are not deleted. Print a message with some suggested actions.
* When a transfer is already being run by another process,
proceed on to the next file, rather than dying.
+ * Fix checking when content is present in a non-bare repository
+ accessed via http.
-- Joey Hess <joeyh@debian.org> Tue, 09 Jul 2013 19:17:13 -0400
diff --git a/doc/bugs/Won__39__t_drop_files__44___even_though_remote_annexes_have_at_least_numcopies.mdwn b/doc/bugs/Won__39__t_drop_files__44___even_though_remote_annexes_have_at_least_numcopies.mdwn
index dcf1ff1e8..ec87cefbe 100644
--- a/doc/bugs/Won__39__t_drop_files__44___even_though_remote_annexes_have_at_least_numcopies.mdwn
+++ b/doc/bugs/Won__39__t_drop_files__44___even_though_remote_annexes_have_at_least_numcopies.mdwn
@@ -35,3 +35,5 @@ git-annex: drop: 1 failed
the given curl command fails with a 404, because the remote annex isn't using the 3-character hash directory scheme, but the 2-character one, and it seems that 'annex drop' doesn't check both schemes (unlike annex get).
+> Ah, the http remote is a non-bare repository, that's why.
+> Ok, [[fixed|done]]! --[[Joey]]