summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-12 16:06:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-12 16:06:10 -0400
commit2ac47a3a59b2b9b8980b4a9d3277bcb653bcb026 (patch)
tree2d40eae24513c5f895a9da771f0b34d228439c97 /Annex.hs
parent759f146d0fd5857cbbb796367c3dd8c695550b46 (diff)
thread State thru to backends
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Annex.hs b/Annex.hs
index 830f61919..78d990eac 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -45,12 +45,12 @@ startAnnex = do
- the annex directory and setting up the symlink pointing to its content. -}
annexFile :: State -> FilePath -> IO ()
annexFile state file = do
- alreadyannexed <- lookupBackend (backends state) (repo state) file
+ alreadyannexed <- lookupBackend (backends state) state file
case (alreadyannexed) of
Just _ -> error $ "already annexed: " ++ file
Nothing -> do
checkLegal file
- stored <- storeFile (backends state) (repo state) file
+ stored <- storeFile (backends state) state file
case (stored) of
Nothing -> error $ "no backend could store: " ++ file
Just key -> symlink key
@@ -70,11 +70,11 @@ annexFile state file = do
{- Inverse of annexFile. -}
unannexFile :: State -> FilePath -> IO ()
unannexFile state file = do
- alreadyannexed <- lookupBackend (backends state) (repo state) file
+ alreadyannexed <- lookupBackend (backends state) state file
case (alreadyannexed) of
Nothing -> error $ "not annexed " ++ file
Just _ -> do
- mkey <- dropFile (backends state) (repo state) file
+ mkey <- dropFile (backends state) state file
case (mkey) of
Nothing -> return ()
Just key -> do
@@ -86,7 +86,7 @@ unannexFile state file = do
{- Transfers the file from a remote. -}
annexGetFile :: State -> FilePath -> IO ()
annexGetFile state file = do
- alreadyannexed <- lookupBackend (backends state) (repo state) file
+ alreadyannexed <- lookupBackend (backends state) state file
case (alreadyannexed) of
Nothing -> error $ "not annexed " ++ file
Just _ -> do error "not implemented" -- TODO