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.
This commit is contained in:
Joey Hess 2017-05-15 23:32:17 -04:00
parent 6dd806f1ad
commit a1730cd6af
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
37 changed files with 230 additions and 101 deletions

View file

@ -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

View file

@ -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 ()

View file

@ -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

View file

@ -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)

View file

@ -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