diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-29 16:22:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-29 16:22:14 -0400 |
commit | 47f4506a1ed1d98d3bdae0de24e00f2eb64611da (patch) | |
tree | 384a5b97fb6710d19c4c26a43d6f364dedf4d4a3 /Assistant/MakeRemote.hs | |
parent | f62e5c41e4621940a863b35c9c54e0626587a694 (diff) |
lifted Assistant.Sync into Assistant monad
lots of nice cleanups
Diffstat (limited to 'Assistant/MakeRemote.hs')
-rw-r--r-- | Assistant/MakeRemote.hs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Assistant/MakeRemote.hs b/Assistant/MakeRemote.hs index 8aa7cb2e8..1eb9d3919 100644 --- a/Assistant/MakeRemote.hs +++ b/Assistant/MakeRemote.hs @@ -8,9 +8,6 @@ module Assistant.MakeRemote where import Assistant.Common -import Assistant.ThreadedMonad -import Assistant.DaemonStatus -import Assistant.ScanRemotes import Assistant.Ssh import Assistant.Sync import qualified Types.Remote as R @@ -28,11 +25,11 @@ import qualified Data.Map as M import Data.Char {- Sets up and begins syncing with a new ssh or rsync remote. -} -makeSshRemote :: ThreadState -> DaemonStatusHandle -> ScanRemoteMap -> Bool -> SshData -> IO Remote -makeSshRemote st dstatus scanremotes forcersync sshdata = do - r <- runThreadState st $ +makeSshRemote :: Bool -> SshData -> Assistant Remote +makeSshRemote forcersync sshdata = do + r <- liftAnnex $ addRemote $ maker (sshRepoName sshdata) sshurl - syncNewRemote st dstatus scanremotes r + syncNewRemote r return r where rsync = forcersync || rsyncOnly sshdata |