rename helper

More consistent name with TransferrerPool
This commit is contained in:
Joey Hess 2020-12-09 13:21:20 -04:00
parent 3fa2bc2eed
commit 677003a6df
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 16 additions and 16 deletions

View file

@ -1,4 +1,4 @@
{- A pool of "git-annex transfer" processes {- A pool of "git-annex transferrer" processes
- -
- Copyright 2013-2020 Joey Hess <id@joeyh.name> - Copyright 2013-2020 Joey Hess <id@joeyh.name>
- -
@ -205,7 +205,7 @@ detectStalls (Just (StallDetection minsz duration)) metervar onstall = go Nothin
mkTransferrer :: FilePath -> BatchCommandMaker -> IO Transferrer mkTransferrer :: FilePath -> BatchCommandMaker -> IO Transferrer
mkTransferrer program batchmaker = do mkTransferrer program batchmaker = do
{- It runs as a batch job. -} {- It runs as a batch job. -}
let (program', params') = batchmaker (program, [Param "transfer"]) let (program', params') = batchmaker (program, [Param "transferrer"])
{- It's put into its own group so that the whole group can be {- It's put into its own group so that the whole group can be
- killed to stop a transfer. -} - killed to stop a transfer. -}
(Just writeh, Just readh, _, pid) <- createProcess (Just writeh, Just readh, _, pid) <- createProcess
@ -246,10 +246,10 @@ readResponse h = do
case readMaybe l of case readMaybe l of
Just (TransferOutput so) -> return (Left so) Just (TransferOutput so) -> return (Left so)
Just (TransferResult r) -> return (Right r) Just (TransferResult r) -> return (Right r)
Nothing -> transferProtocolError l Nothing -> transferrerProtocolError l
transferProtocolError :: String -> a transferrerProtocolError :: String -> a
transferProtocolError l = error $ "transfer protocol error: " ++ show l transferrerProtocolError l = error $ "transferrer protocol error: " ++ show l
{- Closing the fds will shut down the transferrer, but only when it's {- Closing the fds will shut down the transferrer, but only when it's
- in between transfers. -} - in between transfers. -}

View file

@ -35,7 +35,7 @@ import qualified Command.FromKey
import qualified Command.RegisterUrl import qualified Command.RegisterUrl
import qualified Command.SetKey import qualified Command.SetKey
import qualified Command.DropKey import qualified Command.DropKey
import qualified Command.Transfer import qualified Command.Transferrer
import qualified Command.TransferKey import qualified Command.TransferKey
import qualified Command.TransferKeys import qualified Command.TransferKeys
import qualified Command.SetPresentKey import qualified Command.SetPresentKey
@ -178,7 +178,7 @@ cmds testoptparser testrunner mkbenchmarkgenerator =
, Command.RegisterUrl.cmd , Command.RegisterUrl.cmd
, Command.SetKey.cmd , Command.SetKey.cmd
, Command.DropKey.cmd , Command.DropKey.cmd
, Command.Transfer.cmd , Command.Transferrer.cmd
, Command.TransferKey.cmd , Command.TransferKey.cmd
, Command.TransferKeys.cmd , Command.TransferKeys.cmd
, Command.SetPresentKey.cmd , Command.SetPresentKey.cmd

View file

@ -5,7 +5,7 @@
- Licensed under the GNU AGPL version 3 or higher. - Licensed under the GNU AGPL version 3 or higher.
-} -}
module Command.Transfer where module Command.Transferrer where
import Command import Command
import qualified Annex import qualified Annex
@ -22,7 +22,7 @@ import Annex.TransferrerPool
import Text.Read (readMaybe) import Text.Read (readMaybe)
cmd :: Command cmd :: Command
cmd = command "transfer" SectionPlumbing "transfers content" cmd = command "transferrer" SectionPlumbing "transfers content"
paramNothing (withParams seek) paramNothing (withParams seek)
seek :: CmdParams -> CommandSeek seek :: CmdParams -> CommandSeek
@ -104,8 +104,8 @@ runRequests readh writeh a = go Nothing Nothing
Just remote -> do Just remote -> do
sendresult =<< a tr remote sendresult =<< a tr remote
go (Just remoteoruuid) mremote go (Just remoteoruuid) mremote
Nothing -> transferProtocolError l Nothing -> transferrerProtocolError l
Nothing -> transferProtocolError l Nothing -> transferrerProtocolError l
sendresult b = liftIO $ do sendresult b = liftIO $ do
hPutStrLn writeh $ show $ TransferResult b hPutStrLn writeh $ show $ TransferResult b

View file

@ -1,10 +1,10 @@
# NAME # NAME
git-annex transfer - transfers content git-annex transferrer - transfers content
# SYNOPSIS # SYNOPSIS
git annex transfer git annex transferrer
# DESCRIPTION # DESCRIPTION

View file

@ -631,11 +631,11 @@ content from the key-value store.
See [[git-annex-transferkey]](1) for details. See [[git-annex-transferkey]](1) for details.
* `transfer` * `transferrer`
Used internally by git-annex to transfer content. Used internally by git-annex to transfer content.
See [[git-annex-transfer]](1) for details. See [[git-annex-transferrer]](1) for details.
* `transferkeys` * `transferkeys`

View file

@ -794,7 +794,7 @@ Executable git-annex
Command.Test Command.Test
Command.TestRemote Command.TestRemote
Command.TransferInfo Command.TransferInfo
Command.Transfer Command.Transferrer
Command.TransferKey Command.TransferKey
Command.TransferKeys Command.TransferKeys
Command.Trust Command.Trust