summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 14:09:57 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 14:09:57 -0400
commit4e88f7e9af6a776347649047f2473e470a729ed9 (patch)
treebaa24cac409b25155aed0bcb7e006028ab743dc4 /Remote
parent9949e46e150be17320c22a096ead5ffd0fb5a8a6 (diff)
Revert "let url claims optionally include a suggested filename"
This reverts commit bc0bf97b20c48e1d1a35d25e2e76a311c102438c. Putting filename in the claim was a bad idea.
Diffstat (limited to 'Remote')
-rw-r--r--Remote/External.hs10
-rw-r--r--Remote/External/Types.hs2
2 files changed, 4 insertions, 8 deletions
diff --git a/Remote/External.hs b/Remote/External.hs
index baae1ab9d..62671755c 100644
--- a/Remote/External.hs
+++ b/Remote/External.hs
@@ -12,7 +12,6 @@ import qualified Annex
import Common.Annex
import Types.Remote
import Types.CleanupActions
-import Types.URLClaim
import qualified Git
import Config
import Remote.Helper.Special
@@ -422,13 +421,12 @@ getAvailability external r gc = maybe query return (remoteAnnexAvailability gc)
setRemoteAvailability r avail
return avail
-claimurl :: External -> URLString -> Annex (Maybe URLClaim)
+claimurl :: External -> URLString -> Annex Bool
claimurl external url =
handleRequest external (CLAIMURL url) Nothing $ \req -> case req of
- CLAIMURL_SUCCESS -> Just $ return $ Just URLClaimed
- (CLAIMURL_AS f) -> Just $ return $ Just $ URLClaimedAs f
- CLAIMURL_FAILURE -> Just $ return Nothing
- UNSUPPORTED_REQUEST -> Just $ return Nothing
+ CLAIMURL_SUCCESS -> Just $ return True
+ CLAIMURL_FAILURE -> Just $ return False
+ UNSUPPORTED_REQUEST -> Just $ return False
_ -> Nothing
checkurl :: External -> URLString -> Annex (Maybe Integer)
diff --git a/Remote/External/Types.hs b/Remote/External/Types.hs
index a230ef3d2..b00352702 100644
--- a/Remote/External/Types.hs
+++ b/Remote/External/Types.hs
@@ -136,7 +136,6 @@ data Response
| INITREMOTE_SUCCESS
| INITREMOTE_FAILURE ErrorMsg
| CLAIMURL_SUCCESS
- | CLAIMURL_AS FilePath
| CLAIMURL_FAILURE
| CHECKURL_SIZE Size
| CHECKURL_SIZEUNKNOWN
@@ -159,7 +158,6 @@ instance Proto.Receivable Response where
parseCommand "INITREMOTE-SUCCESS" = Proto.parse0 INITREMOTE_SUCCESS
parseCommand "INITREMOTE-FAILURE" = Proto.parse1 INITREMOTE_FAILURE
parseCommand "CLAIMURL-SUCCESS" = Proto.parse0 CLAIMURL_SUCCESS
- parseCommand "CLAIMURL-AS" = Proto.parse1 CLAIMURL_AS
parseCommand "CLAIMURL-FAILURE" = Proto.parse0 CLAIMURL_FAILURE
parseCommand "CHECKURL-SIZE" = Proto.parse1 CHECKURL_SIZE
parseCommand "CHECKURL-SIZEUNKNOWN" = Proto.parse0 CHECKURL_SIZEUNKNOWN