break depends cycle
This commit is contained in:
parent
859731ee5b
commit
d4ce072452
3 changed files with 13 additions and 3 deletions
13
Backend.hs
13
Backend.hs
|
@ -33,6 +33,19 @@ import qualified Annex
|
|||
import Utility
|
||||
import Types
|
||||
import qualified BackendTypes as B
|
||||
import BackendList
|
||||
|
||||
{- List of backends in the order to try them when storing a new key. -}
|
||||
backendList :: Annex [Backend]
|
||||
backendList = do
|
||||
l <- Annex.backends
|
||||
if (0 < length l)
|
||||
then return l
|
||||
else do
|
||||
g <- Annex.gitRepo
|
||||
let l = parseBackendList $ Git.configGet g "annex.backends" ""
|
||||
Annex.backendsChange l
|
||||
return l
|
||||
|
||||
{- Attempts to store a file in one of the backends. -}
|
||||
storeFileKey :: FilePath -> Annex (Maybe (Key, Backend))
|
||||
|
|
|
@ -14,7 +14,6 @@ import Locations
|
|||
import qualified Remotes
|
||||
import qualified GitRepo as Git
|
||||
import Utility
|
||||
import Core
|
||||
|
||||
backend = Backend {
|
||||
name = "file",
|
||||
|
|
2
Core.hs
2
Core.hs
|
@ -27,8 +27,6 @@ start = do
|
|||
g' <- liftIO $ Git.configRead g
|
||||
Annex.gitRepoChange g'
|
||||
liftIO $ gitSetup g'
|
||||
Annex.backendsChange $ parseBackendList $
|
||||
Git.configGet g' "annex.backends" ""
|
||||
prepUUID
|
||||
|
||||
{- Sets up a git repo for git-annex. May be called repeatedly. -}
|
||||
|
|
Loading…
Add table
Reference in a new issue