diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-14 14:14:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-14 14:14:19 -0400 |
commit | a200761e66f01a271c90ce67482105befca6ef09 (patch) | |
tree | 5b2d94670d63db3201851785b3c13bf6392b251b /Backend | |
parent | f9557d7c5e2aa7ef19a5d589594154a21c7f2caa (diff) |
implemented basic --drop
Diffstat (limited to 'Backend')
-rw-r--r-- | Backend/File.hs | 6 | ||||
-rw-r--r-- | Backend/Url.hs | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Backend/File.hs b/Backend/File.hs index 2ac12487e..311fe820b 100644 --- a/Backend/File.hs +++ b/Backend/File.hs @@ -28,13 +28,15 @@ keyValue file = return $ Just $ Key file {- This backend does not really do any independant data storage, - it relies on the file contents in .git/annex/ in this repo, - - and other accessible repos. So storing or removing a key is + - and other accessible repos. So storing a key is - a no-op. TODO until support is added for git annex --push otherrepo, - then these could implement that.. -} dummyStore :: FilePath -> Key -> Annex (Bool) dummyStore file key = return True + +{- Allow keys to be removed. -} dummyRemove :: Key -> Annex Bool -dummyRemove url = return False +dummyRemove url = return True {- Try to find a copy of the file in one of the remotes, - and copy it over to this one. -} diff --git a/Backend/Url.hs b/Backend/Url.hs index 9831c337b..3d971864a 100644 --- a/Backend/Url.hs +++ b/Backend/Url.hs @@ -23,8 +23,10 @@ keyValue file = return Nothing -- cannot change url contents dummyStore :: FilePath -> Key -> Annex Bool dummyStore file url = return False + +-- allow keys to be removed dummyRemove :: Key -> Annex Bool -dummyRemove url = return False +dummyRemove url = return True downloadUrl :: Key -> FilePath -> Annex Bool downloadUrl url file = do |