break depends cycle

This commit is contained in:
Joey Hess 2010-10-14 15:58:53 -04:00
parent 859731ee5b
commit d4ce072452
3 changed files with 13 additions and 3 deletions

View file

@ -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))