remove URL backend
This commit is contained in:
parent
6ba866ca73
commit
2cdacfbae6
3 changed files with 6 additions and 63 deletions
|
@ -1,61 +0,0 @@
|
||||||
{- git-annex "URL" backend
|
|
||||||
-
|
|
||||||
- Copyright 2010 Joey Hess <joey@kitenet.net>
|
|
||||||
-
|
|
||||||
- Licensed under the GNU GPL version 3 or higher.
|
|
||||||
-}
|
|
||||||
|
|
||||||
module Backend.URL (backends) where
|
|
||||||
|
|
||||||
import Control.Monad.State (liftIO)
|
|
||||||
|
|
||||||
import Types
|
|
||||||
import Types.Backend
|
|
||||||
import Utility
|
|
||||||
import Messages
|
|
||||||
import Types.Key
|
|
||||||
|
|
||||||
backends :: [Backend Annex]
|
|
||||||
backends = [backend]
|
|
||||||
|
|
||||||
backend :: Backend Annex
|
|
||||||
backend = Backend {
|
|
||||||
name = "URL",
|
|
||||||
getKey = keyValue,
|
|
||||||
storeFileKey = dummyStore,
|
|
||||||
retrieveKeyFile = downloadUrl,
|
|
||||||
-- allow keys to be removed; presumably they can always be
|
|
||||||
-- downloaded again
|
|
||||||
removeKey = dummyRemove,
|
|
||||||
-- similarly, keys are always assumed to be out there on the web
|
|
||||||
hasKey = dummyOk,
|
|
||||||
-- and nothing needed to fsck
|
|
||||||
fsckKey = dummyFsck,
|
|
||||||
-- and key upgrade not needed
|
|
||||||
upgradableKey = \_ -> return False
|
|
||||||
}
|
|
||||||
|
|
||||||
-- cannot generate url from filename
|
|
||||||
keyValue :: FilePath -> Annex (Maybe Key)
|
|
||||||
keyValue _ = return Nothing
|
|
||||||
|
|
||||||
-- cannot change url contents
|
|
||||||
dummyStore :: FilePath -> Key -> Annex Bool
|
|
||||||
dummyStore _ _ = return False
|
|
||||||
|
|
||||||
dummyRemove :: Key -> Maybe a -> Annex Bool
|
|
||||||
dummyRemove _ _ = return True
|
|
||||||
|
|
||||||
dummyFsck :: Key -> Maybe FilePath -> Maybe a -> Annex Bool
|
|
||||||
dummyFsck _ _ _ = return True
|
|
||||||
|
|
||||||
dummyOk :: Key -> Annex Bool
|
|
||||||
dummyOk _ = return True
|
|
||||||
|
|
||||||
downloadUrl :: Key -> FilePath -> Annex Bool
|
|
||||||
downloadUrl key file = do
|
|
||||||
showNote $ "downloading"
|
|
||||||
showProgress -- make way for curl progress bar
|
|
||||||
liftIO $ boolSystem "curl" [Params "-# -o", File file, File url]
|
|
||||||
where
|
|
||||||
url = keyName key
|
|
|
@ -10,12 +10,10 @@ module BackendList (allBackends) where
|
||||||
-- When adding a new backend, import it here and add it to the list.
|
-- When adding a new backend, import it here and add it to the list.
|
||||||
import qualified Backend.WORM
|
import qualified Backend.WORM
|
||||||
import qualified Backend.SHA
|
import qualified Backend.SHA
|
||||||
import qualified Backend.URL
|
|
||||||
import Types
|
import Types
|
||||||
|
|
||||||
allBackends :: [Backend Annex]
|
allBackends :: [Backend Annex]
|
||||||
allBackends = concat
|
allBackends = concat
|
||||||
[ Backend.WORM.backends
|
[ Backend.WORM.backends
|
||||||
, Backend.SHA.backends
|
, Backend.SHA.backends
|
||||||
, Backend.URL.backends
|
|
||||||
]
|
]
|
||||||
|
|
6
debian/NEWS
vendored
6
debian/NEWS
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
git-annex (3.20110702) unstable; urgency=low
|
||||||
|
|
||||||
|
The URL backend has been removed. Instead the new web remote can be used.
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Fri, 01 Jul 2011 15:40:51 -0400
|
||||||
|
|
||||||
git-annex (3.20110624) exerimental; urgency=low
|
git-annex (3.20110624) exerimental; urgency=low
|
||||||
|
|
||||||
There has been another change to the git-annex data store.
|
There has been another change to the git-annex data store.
|
||||||
|
|
Loading…
Reference in a new issue