basic s3 remote start

But bucket name is not handled right; it needs to be globally unique.
This commit is contained in:
Joey Hess 2011-03-28 01:32:47 -04:00
parent 026c76914e
commit a7bd63eb01
3 changed files with 89 additions and 24 deletions

View file

@ -31,11 +31,11 @@ setConfig k value = do
getConfig :: Git.Repo -> ConfigKey -> String -> Annex String
getConfig r key def = do
g <- Annex.gitRepo
let def' = Git.configGet g global def
return $ Git.configGet g local def'
where
local = "remote." ++ fromMaybe "" (Git.repoRemoteName r) ++ ".annex-" ++ key
global = "annex." ++ key
let def' = Git.configGet g ("annex." ++ key) def
return $ Git.configGet g (remoteConfig r key) def'
remoteConfig :: Git.Repo -> ConfigKey -> String
remoteConfig r key = "remote." ++ fromMaybe "" (Git.repoRemoteName r) ++ ".annex-" ++ key
{- Calculates cost for a remote.
-