clean Annex stuff out of Utility/

This commit is contained in:
Joey Hess 2011-10-16 00:04:26 -04:00
parent 52c8244219
commit 91366c896d
8 changed files with 14 additions and 16 deletions

View file

@ -16,7 +16,7 @@ import Common.Annex
import Types.Remote
import qualified Git
import Config
import Utility.Ssh
import Annex.Ssh
import Remote.Helper.Special
import Remote.Helper.Encryptable
import Crypto

View file

@ -13,7 +13,7 @@ import qualified Data.Map as M
import Common.Annex
import Utility.CopyFile
import Utility.RsyncFile
import Utility.Ssh
import Annex.Ssh
import Types.Remote
import qualified Git
import qualified Annex
@ -164,7 +164,7 @@ copyFromRemote :: Git.Repo -> Key -> FilePath -> Annex Bool
copyFromRemote r key file
| not $ Git.repoIsUrl r = rsyncOrCopyFile r (gitAnnexLocation r key) file
| Git.repoIsSsh r = rsyncHelper =<< rsyncParamsRemote r True key file
| Git.repoIsHttp r = Url.download (keyUrl r key) file
| Git.repoIsHttp r = liftIO $ Url.download (keyUrl r key) file
| otherwise = error "copying from non-ssh, non-http repo not supported"
{- Tries to copy a key's content to a remote's annex. -}

View file

@ -49,7 +49,9 @@ downloadKey key file = get =<< getUrls key
get [] = do
warning "no known url"
return False
get urls = anyM (`Url.download` file) urls
get urls = do
showOutput -- make way for download progress bar
liftIO $ anyM (`Url.download` file) urls
uploadKey :: Key -> Annex Bool
uploadKey _ = do