diff options
Diffstat (limited to 'RemoteDaemon')
-rw-r--r-- | RemoteDaemon/Core.hs | 6 | ||||
-rw-r--r-- | RemoteDaemon/Transport/Ssh.hs | 8 | ||||
-rw-r--r-- | RemoteDaemon/Types.hs | 3 |
3 files changed, 10 insertions, 7 deletions
diff --git a/RemoteDaemon/Core.hs b/RemoteDaemon/Core.hs index bc5ad8a58..405a1fd88 100644 --- a/RemoteDaemon/Core.hs +++ b/RemoteDaemon/Core.hs @@ -117,14 +117,16 @@ genRemoteMap h@(TransportHandle g _) ochan = gen r = case Git.location r of Git.Url u -> case M.lookup (uriScheme u) remoteTransports of Just transport - | remoteAnnexSync (extractRemoteGitConfig r (Git.repoDescribe r)) -> do + | remoteAnnexSync gc -> do ichan <- newTChanIO :: IO (TChan Consumed) return $ Just ( r - , (transport r (RemoteURI u) h ichan ochan, ichan) + , (transport (RemoteRepo r gc) (RemoteURI u) h ichan ochan, ichan) ) _ -> return Nothing _ -> return Nothing + where + gc = extractRemoteGitConfig r (Git.repoDescribe r) genTransportHandle :: IO TransportHandle genTransportHandle = do diff --git a/RemoteDaemon/Transport/Ssh.hs b/RemoteDaemon/Transport/Ssh.hs index 509b8f319..bdf4f54f0 100644 --- a/RemoteDaemon/Transport/Ssh.hs +++ b/RemoteDaemon/Transport/Ssh.hs @@ -22,13 +22,13 @@ import Control.Concurrent.STM import Control.Concurrent.Async transport :: Transport -transport r url h@(TransportHandle g s) ichan ochan = do +transport rr@(RemoteRepo r gc) url h@(TransportHandle g s) ichan ochan = do -- enable ssh connection caching wherever inLocalRepo is called - g' <- liftAnnex h $ sshCachingTo r g - transport' r url (TransportHandle g' s) ichan ochan + g' <- liftAnnex h $ sshOptionsTo r gc g + transport' rr url (TransportHandle g' s) ichan ochan transport' :: Transport -transport' r url transporthandle ichan ochan = do +transport' (RemoteRepo r _) url transporthandle ichan ochan = do v <- liftAnnex transporthandle $ git_annex_shell r "notifychanges" [] [] case v of diff --git a/RemoteDaemon/Types.hs b/RemoteDaemon/Types.hs index 9009533e1..5fd074a1e 100644 --- a/RemoteDaemon/Types.hs +++ b/RemoteDaemon/Types.hs @@ -14,6 +14,7 @@ import Common import qualified Annex import qualified Git.Types as Git import qualified Utility.SimpleProtocol as Proto +import Types.GitConfig import Network.URI import Control.Concurrent @@ -27,7 +28,7 @@ newtype RemoteURI = RemoteURI URI -- from a Chan, and emits others to another Chan. type Transport = RemoteRepo -> RemoteURI -> TransportHandle -> TChan Consumed -> TChan Emitted -> IO () -type RemoteRepo = Git.Repo +data RemoteRepo = RemoteRepo Git.Repo RemoteGitConfig type LocalRepo = Git.Repo -- All Transports share a single AnnexState MVar |