reorganize numcopies code (no behavior changes)
Move stuff into Logs.NumCopies. Add a NumCopies newtype. Better names for various serialization classes that are specific to one thing or another.
This commit is contained in:
parent
e38a21a768
commit
b40df4f0d0
20 changed files with 137 additions and 98 deletions
|
@ -16,6 +16,7 @@ import qualified Command.Get
|
|||
import qualified Remote
|
||||
import Annex.Content
|
||||
import qualified Annex
|
||||
import Logs.NumCopies
|
||||
|
||||
def :: [Command]
|
||||
def = [withOptions (fromToOptions ++ keyOptions) $
|
||||
|
@ -33,10 +34,10 @@ seek ps = do
|
|||
|
||||
start :: Maybe Remote -> Maybe Remote -> FilePath -> (Key, Backend) -> CommandStart
|
||||
start to from file (key, _backend) = do
|
||||
numcopies <- numCopies file
|
||||
numcopies <- getFileNumCopies file
|
||||
startKey numcopies to from (Just file) key
|
||||
|
||||
startKey :: Maybe Int -> Maybe Remote -> Maybe Remote -> Maybe FilePath -> Key -> CommandStart
|
||||
startKey :: Maybe NumCopies -> Maybe Remote -> Maybe Remote -> Maybe FilePath -> Key -> CommandStart
|
||||
startKey numcopies to from afile key = do
|
||||
noAuto
|
||||
case (from, to) of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue