aboutsummaryrefslogtreecommitdiff
path: root/Remote/Bup.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-07 14:46:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-07 15:59:16 -0400
commit63a292324d20832b68c92f784828e55e644481cc (patch)
treef49c7077caf738cd285681421f9c9baa03068c99 /Remote/Bup.hs
parentb08f7c428b4bc9eabd95596d08594ddd1057a0bf (diff)
add a UUID type
Should have done this a long time ago.
Diffstat (limited to 'Remote/Bup.hs')
-rw-r--r--Remote/Bup.hs8
1 files changed, 4 insertions, 4 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. -}