summaryrefslogtreecommitdiff
path: root/BackendFile.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-10 15:41:35 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-10 15:41:35 -0400
commit7880dc16fef81bb6a8812c6b4e9578a6ae2b2879 (patch)
tree7661b3879b848b3b6bdd5924740b74923c991936 /BackendFile.hs
parenteb577ee37ff1d631aa3580a235b9954043d0fb27 (diff)
update
Diffstat (limited to 'BackendFile.hs')
-rw-r--r--BackendFile.hs16
1 files changed, 10 insertions, 6 deletions
diff --git a/BackendFile.hs b/BackendFile.hs
index dd6ff595a..6caf30f65 100644
--- a/BackendFile.hs
+++ b/BackendFile.hs
@@ -4,20 +4,24 @@
module BackendFile (backend) where
import Backend
+import GitRepo
backend = Backend {
name = "file",
getKey = keyValue,
- storeFileKey = moveToAnnex,
+ storeFileKey = dummyStore,
retrieveKeyFile = copyFromOtherRepo
}
-- direct mapping from filename to key
-keyValue :: FilePath -> IO (Maybe Key)
-keyValue k = return $ Just $ id k
+keyValue :: GitRepo -> FilePath -> IO (Maybe Key)
+keyValue repo file = return $ Just file
-moveToAnnex :: FilePath -> Key -> IO (Bool)
-moveToAnnex file key = return False
+-- 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 a file is a no-op.
+dummyStore :: GitRepo -> FilePath -> Key -> IO (Bool)
+dummyStore repo file key = return True
copyFromOtherRepo :: IO Key -> FilePath -> IO (Bool)
-copyFromOtherRepo key file = return False
+copyFromOtherRepo key file = error "copyFromOtherRepo unimplemented" -- TODO