diff options
author | Joey Hess <joey@kitenet.net> | 2013-09-24 13:37:41 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-09-24 13:37:41 -0400 |
commit | a7f9ddb8de7c1e0357046d3dc9efc644bd5fb730 (patch) | |
tree | c4577129c78f9e2d9e40da67cf8d191b7dfb6b25 /Remote/Bup.hs | |
parent | 12a8f2555e1c6d3a8d6ef7d60382265fa5be70b0 (diff) |
factor out more ssh stuff from git remote
This has the dual benefits of making Remote.Git shorter, and letting
Remote.GCrypt use these utilities.
Diffstat (limited to 'Remote/Bup.hs')
-rw-r--r-- | Remote/Bup.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs index 16fe8c8c5..1acb35c82 100644 --- a/Remote/Bup.hs +++ b/Remote/Bup.hs @@ -22,9 +22,10 @@ import qualified Git.Construct import qualified Git.Ref import Config import Config.Cost -import Remote.Helper.Ssh +import qualified Remote.Helper.Ssh as Ssh import Remote.Helper.Special import Remote.Helper.Encryptable +import Remote.Helper.Messages import Crypto import Utility.Hash import Utility.UserInfo @@ -185,7 +186,7 @@ rollback k bupr = go =<< liftIO (bup2GitRemote bupr) checkPresent :: Git.Repo -> Git.Repo -> Key -> Annex (Either String Bool) checkPresent r bupr k | Git.repoIsUrl bupr = do - showAction $ "checking " ++ Git.repoDescribe r + showChecking r ok <- onBupRemote bupr boolSystem "git" params return $ Right ok | otherwise = liftIO $ catchMsgIO $ @@ -220,7 +221,7 @@ storeBupUUID u buprepo = do onBupRemote :: Git.Repo -> (FilePath -> [CommandParam] -> IO a) -> FilePath -> [CommandParam] -> Annex a onBupRemote r a command params = do - sshparams <- sshToRepo r [Param $ + sshparams <- Ssh.toRepo r [Param $ "cd " ++ dir ++ " && " ++ unwords (command : toCommand params)] liftIO $ a "ssh" sshparams where |