diff options
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Bup.hs | 8 | ||||
-rw-r--r-- | Remote/Git.hs | 2 | ||||
-rw-r--r-- | Remote/Helper/Special.hs | 2 | ||||
-rw-r--r-- | Remote/S3real.hs | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs index 48014f1da..b613225b8 100644 --- a/Remote/Bup.hs +++ b/Remote/Bup.hs @@ -161,13 +161,13 @@ storeBupUUID u buprepo = do then do showAction "storing uuid" onBupRemote r boolSystem "git" - [Params $ "config annex.uuid " ++ u] + [Params $ "config annex.uuid " ++ show u] >>! error "ssh failed" else liftIO $ do r' <- Git.configRead r let olduuid = Git.configGet r' "annex.uuid" "" when (olduuid == "") $ - Git.run r' "config" [Param "annex.uuid", Param u] + Git.run r' "config" [Param "annex.uuid", Param $ show u] onBupRemote :: Git.Repo -> (FilePath -> [CommandParam] -> IO a) -> FilePath -> [CommandParam] -> Annex a onBupRemote r a command params = do @@ -192,8 +192,8 @@ getBupUUID r u | otherwise = liftIO $ do ret <- try $ Git.configRead r case ret of - Right r' -> return (Git.configGet r' "annex.uuid" "", r') - Left _ -> return ("", r) + Right r' -> return (read $ Git.configGet r' "annex.uuid" "", r') + Left _ -> return (NoUUID, r) {- Converts a bup remote path spec into a Git.Repo. There are some - differences in path representation between git and bup. -} diff --git a/Remote/Git.hs b/Remote/Git.hs index 0cd64c921..4c76e8ce6 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -60,7 +60,7 @@ gen r u _ = do r' <- case (cheap, notignored, u) of (_, False, _) -> return r (True, _, _) -> tryGitConfigRead r - (False, _, "") -> tryGitConfigRead r + (False, _, NoUUID) -> tryGitConfigRead r _ -> return r u' <- getRepoUUID r' diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs index 52f2dbf95..8a9a01a22 100644 --- a/Remote/Helper/Special.hs +++ b/Remote/Helper/Special.hs @@ -32,7 +32,7 @@ gitConfigSpecialRemote u c k v = do g <- gitRepo liftIO $ do Git.run g "config" [Param (configsetting $ "annex-"++k), Param v] - Git.run g "config" [Param (configsetting "annex-uuid"), Param u] + Git.run g "config" [Param (configsetting "annex-uuid"), Param $ show u] where remotename = fromJust (M.lookup "name" c) configsetting s = "remote." ++ remotename ++ "." ++ s diff --git a/Remote/S3real.hs b/Remote/S3real.hs index 89b032637..1f5b2bd59 100644 --- a/Remote/S3real.hs +++ b/Remote/S3real.hs @@ -64,7 +64,7 @@ s3Setup :: UUID -> RemoteConfig -> Annex RemoteConfig s3Setup u c = handlehost $ M.lookup "host" c where remotename = fromJust (M.lookup "name" c) - defbucket = remotename ++ "-" ++ u + defbucket = remotename ++ "-" ++ show u defaults = M.fromList [ ("datacenter", "US") , ("storageclass", "STANDARD") |