diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-01 10:33:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-01 10:33:55 -0400 |
commit | 6f622c6043ad8db9f27a16020c371af68506e8e7 (patch) | |
tree | ff3ac9ebc96979f98220dc15ca7356c3a0906022 /Remote.hs | |
parent | cf46308597d8633cc7bad9687f7f0baf91e14992 (diff) |
improve sync with xmpp and annex-ignore
* sync --content: Honor annex-ignore configuration.
* sync: Don't try to sync with xmpp remotes, which are only currently
supported when using the assistant.
Diffstat (limited to 'Remote.hs')
-rw-r--r-- | Remote.hs | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -41,7 +41,8 @@ module Remote ( showLocations, forceTrust, logStatus, - checkAvailable + checkAvailable, + isXMPPRemote ) where import qualified Data.Map as M @@ -60,6 +61,7 @@ import Logs.Location hiding (logStatus) import Remote.List import Config import Git.Types (RemoteName) +import qualified Git {- Map from UUIDs of Remotes to a calculated value. -} remoteMap :: (Remote -> a) -> Annex (M.Map UUID a) @@ -292,3 +294,9 @@ byCost = map snd . sortBy (comparing fst) . M.toList . costmap checkAvailable :: Bool -> Remote -> IO Bool checkAvailable assumenetworkavailable = maybe (return assumenetworkavailable) doesDirectoryExist . localpath + +{- Remotes using the XMPP transport have urls like xmpp::user@host -} +isXMPPRemote :: Remote -> Bool +isXMPPRemote remote = Git.repoIsUrl r && "xmpp::" `isPrefixOf` Git.repoLocation r + where + r = repo remote |