diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-21 16:08:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-21 16:08:59 -0400 |
commit | d5f7fb27aad3e2e9c4bebb9ccd5577af8deb25c7 (patch) | |
tree | 838837e3112942fcf0f82cfc7f68e62a6f4e7a6e /Command/Mirror.hs | |
parent | 9a8709f064c7608859b3155a752093b29cd8ab98 (diff) |
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.
Diffstat (limited to 'Command/Mirror.hs')
-rw-r--r-- | Command/Mirror.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Command/Mirror.hs b/Command/Mirror.hs index cf4663cb5..e5ce33ec0 100644 --- a/Command/Mirror.hs +++ b/Command/Mirror.hs @@ -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 |