diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-06-26 12:15:27 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-06-26 12:15:55 -0400 |
commit | 63f9aba33b45e5bab688ffaa5e4182801c152828 (patch) | |
tree | 1f4e16640503b27bbd0f33241cbe1cb2c4a4eb89 /Utility/Rsync.hs | |
parent | c799b05deae723690bfac5e867f7985e8f800d0d (diff) | |
download | git-repair-63f9aba33b45e5bab688ffaa5e4182801c152828.tar.gz |
merge from git-annex
Removes dependency on MissingH, adding a dependency on split instead.
This commit was sponsored by Brock Spratlen on Patreon.
Diffstat (limited to 'Utility/Rsync.hs')
-rw-r--r-- | Utility/Rsync.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Utility/Rsync.hs b/Utility/Rsync.hs index d3fe981..f190b40 100644 --- a/Utility/Rsync.hs +++ b/Utility/Rsync.hs @@ -11,10 +11,10 @@ module Utility.Rsync where import Common import Utility.Metered +import Utility.Tuple import Data.Char import System.Console.GetOpt -import Data.Tuple.Utils {- Generates parameters to make rsync use a specified command as its remote - shell. -} @@ -24,7 +24,7 @@ rsyncShell command = [Param "-e", Param $ unwords $ map escape (toCommand comman {- rsync requires some weird, non-shell like quoting in - here. A doubled single quote inside the single quoted - string is a single quote. -} - escape s = "'" ++ intercalate "''" (split "'" s) ++ "'" + escape s = "'" ++ intercalate "''" (splitc '\'' s) ++ "'" {- Runs rsync in server mode to send a file. -} rsyncServerSend :: [CommandParam] -> FilePath -> IO Bool @@ -123,7 +123,7 @@ parseRsyncProgress = go [] . reverse . progresschunks {- Find chunks that each start with delim. - The first chunk doesn't start with it - (it's empty when delim is at the start of the string). -} - progresschunks = drop 1 . split [delim] + progresschunks = drop 1 . splitc delim findbytesstart s = dropWhile isSpace s parsebytes :: String -> Maybe Integer |