summaryrefslogtreecommitdiff
path: root/Remote/Bup.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/Bup.hs')
-rw-r--r--Remote/Bup.hs16
1 files changed, 9 insertions, 7 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs
index e705bbb34..4d63d88e1 100644
--- a/Remote/Bup.hs
+++ b/Remote/Bup.hs
@@ -15,6 +15,8 @@ import System.Process
import Common.Annex
import Types.Remote
import qualified Git
+import qualified Git.Config
+import qualified Git.Construct
import Config
import Annex.Ssh
import Remote.Helper.Special
@@ -163,8 +165,8 @@ storeBupUUID u buprepo = do
[Params $ "config annex.uuid " ++ v]
>>! error "ssh failed"
else liftIO $ do
- r' <- Git.configRead r
- let olduuid = Git.configGet "annex.uuid" "" r'
+ r' <- Git.Config.read r
+ let olduuid = Git.Config.get "annex.uuid" "" r'
when (olduuid == "") $
Git.run "config"
[Param "annex.uuid", Param v] r'
@@ -192,9 +194,9 @@ getBupUUID :: Git.Repo -> UUID -> Annex (UUID, Git.Repo)
getBupUUID r u
| Git.repoIsUrl r = return (u, r)
| otherwise = liftIO $ do
- ret <- try $ Git.configRead r
+ ret <- try $ Git.Config.read r
case ret of
- Right r' -> return (toUUID $ Git.configGet "annex.uuid" "" r', r')
+ Right r' -> return (toUUID $ Git.Config.get "annex.uuid" "" r', r')
Left _ -> return (NoUUID, r)
{- Converts a bup remote path spec into a Git.Repo. There are some
@@ -203,13 +205,13 @@ bup2GitRemote :: BupRepo -> IO Git.Repo
bup2GitRemote "" = do
-- bup -r "" operates on ~/.bup
h <- myHomeDir
- Git.repoFromAbsPath $ h </> ".bup"
+ Git.Construct.fromAbsPath $ h </> ".bup"
bup2GitRemote r
| bupLocal r =
if head r == '/'
- then Git.repoFromAbsPath r
+ then Git.Construct.fromAbsPath r
else error "please specify an absolute path"
- | otherwise = Git.repoFromUrl $ "ssh://" ++ host ++ slash dir
+ | otherwise = Git.Construct.fromUrl $ "ssh://" ++ host ++ slash dir
where
bits = split ":" r
host = head bits