diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-05-15 23:32:17 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-05-16 01:03:52 -0400 |
commit | 4dc2000f97236089a8613cc6b0bf9846fea6abfa (patch) | |
tree | 83df60ef702246b0b71bc99e141d4a8bf1990438 /Remote | |
parent | 973180b077e60b5d12d7c57d926878d11d7f2105 (diff) |
adeiu, MissingH
Removed dependency on MissingH, instead depending on the split
library.
After laying groundwork for this since 2015, it
was mostly straightforward. Added Utility.Tuple and
Utility.Split. Eyeballed System.Path.WildMatch while implementing
the same thing.
Since MissingH's progress meter display was being used, I re-implemented
my own. Bonus: Now progress is displayed for transfers of files of
unknown size.
This commit was sponsored by Shane-o on Patreon.
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Helper/Encryptable.hs | 2 | ||||
-rw-r--r-- | Remote/Helper/Special.hs | 2 | ||||
-rw-r--r-- | Remote/Rsync/RsyncUrl.hs | 2 | ||||
-rw-r--r-- | Remote/S3.hs | 2 | ||||
-rw-r--r-- | Remote/WebDAV/DavLocation.hs | 6 |
5 files changed, 7 insertions, 7 deletions
diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs index b72a60efa..1fe6d75be 100644 --- a/Remote/Helper/Encryptable.hs +++ b/Remote/Helper/Encryptable.hs @@ -21,13 +21,13 @@ module Remote.Helper.Encryptable ( import qualified Data.Map as M import qualified "sandi" Codec.Binary.Base64 as B64 import qualified Data.ByteString as B -import Data.Bits.Utils import Annex.Common import Types.Remote import Crypto import Types.Crypto import qualified Annex +import Utility.FileSystemEncoding -- Used to ensure that encryption has been set up before trying to -- eg, store creds in the remote config that would need to use the diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs index 28970872e..ae654d517 100644 --- a/Remote/Helper/Special.hs +++ b/Remote/Helper/Special.hs @@ -62,7 +62,7 @@ findSpecialRemotes s = do where remotepairs = M.toList . M.filterWithKey match construct (k,_) = Git.Construct.remoteNamedFromKey k (pure Git.Construct.fromUnknown) - match k _ = startswith "remote." k && endswith (".annex-"++s) k + match k _ = "remote." `isPrefixOf` k && (".annex-"++s) `isSuffixOf` k {- Sets up configuration for a special remote in .git/config. -} gitConfigSpecialRemote :: UUID -> RemoteConfig -> String -> String -> Annex () diff --git a/Remote/Rsync/RsyncUrl.hs b/Remote/Rsync/RsyncUrl.hs index f7e9ebbb9..c0f30c1fb 100644 --- a/Remote/Rsync/RsyncUrl.hs +++ b/Remote/Rsync/RsyncUrl.hs @@ -17,7 +17,7 @@ import Utility.SafeCommand import Data.Default import System.FilePath.Posix #ifdef mingw32_HOST_OS -import Data.String.Utils +import Utility.Split #endif import Annex.DirHashes diff --git a/Remote/S3.hs b/Remote/S3.hs index ab8411726..a341da488 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -29,7 +29,6 @@ import Control.Monad.Trans.Resource import Control.Monad.Catch import Data.Conduit import Data.IORef -import Data.Bits.Utils import System.Log.Logger import Annex.Common @@ -46,6 +45,7 @@ import Annex.UUID import Logs.Web import Utility.Metered import Utility.DataUnits +import Utility.FileSystemEncoding import Annex.Content import Annex.Url (withUrlOptions) import Utility.Url (checkBoth, managerSettings, closeManager) diff --git a/Remote/WebDAV/DavLocation.hs b/Remote/WebDAV/DavLocation.hs index e0e184686..daa669de1 100644 --- a/Remote/WebDAV/DavLocation.hs +++ b/Remote/WebDAV/DavLocation.hs @@ -13,14 +13,14 @@ module Remote.WebDAV.DavLocation where import Types import Annex.Locations import Utility.Url (URLString) +#ifdef mingw32_HOST_OS +import Utility.Split +#endif import System.FilePath.Posix -- for manipulating url paths import Network.Protocol.HTTP.DAV (inDAVLocation, DAVT) import Control.Monad.IO.Class (MonadIO) import Data.Default -#ifdef mingw32_HOST_OS -import Data.String.Utils -#endif -- Relative to the top of the DAV url. type DavLocation = String |