better messages

This commit is contained in:
Joey Hess 2010-10-25 20:48:32 -04:00
parent 0788c12ffe
commit 99eaf41da5
4 changed files with 6 additions and 8 deletions

View file

@ -436,6 +436,7 @@ moveToPerform file key = do
showNote $ show err
return Nothing
Right False -> do
Core.showNote $ "moving to " ++ (Git.repoDescribe r) ++ "..."
let tmpfile = (annexTmpLocation remote) ++ (keyFile key)
ok <- Remotes.copyToRemote remote key tmpfile
if (ok)
@ -478,14 +479,13 @@ moveFromPerform file key = do
if (ishere)
then return $ Just $ moveFromCleanup remote key
else do
-- copy content from remote
Core.showNote $ "moving from " ++ (Git.repoDescribe r) ++ "..."
ok <- getViaTmp key (Remotes.copyFromRemote remote key)
if (ok)
then return $ Just $ moveFromCleanup remote key
else return Nothing -- fail
moveFromCleanup :: Git.Repo -> Key -> Annex Bool
moveFromCleanup remote key = do
showNote $ "dropping from " ++ (Git.repoDescribe remote) ++ "..."
Remotes.runCmd remote "git-annex" ["dropkey", "--quiet", "--force",
"--backend=" ++ (backendName key),
keyName key]

View file

@ -188,7 +188,6 @@ tryGitConfigRead r = do
{- Tries to copy a key's content from a remote to a file. -}
copyFromRemote :: Git.Repo -> Key -> FilePath -> Annex Bool
copyFromRemote r key file = do
Core.showNote $ "copying from " ++ (Git.repoDescribe r) ++ "..."
if (not $ Git.repoIsUrl r)
then getlocal
else if (Git.repoIsSsh r)
@ -206,7 +205,6 @@ copyToRemote :: Git.Repo -> Key -> FilePath -> Annex Bool
copyToRemote r key file = do
g <- Annex.gitRepo
let keyloc = annexLocation g key
Core.showNote $ "copying to " ++ (Git.repoDescribe r) ++ "..."
if (not $ Git.repoIsUrl r)
then putlocal keyloc
else if (Git.repoIsSsh r)

View file

@ -53,7 +53,7 @@ content from the key-value store.
# git commit -a -m "freed up space"
# git annex move iso --to=usbdrive
move iso/Debian_5.0.iso (to usbdrive...) ok
move iso/Debian_5.0.iso (moving to usbdrive...) ok
# SUBCOMMANDS

View file

@ -181,11 +181,11 @@ laptop. Doing that by hand (by using `git annex get` and `git annex drop`)
is possible, but a bit of a pain. `git annex move` makes it very easy.
# git annex move my_cool_big_file --to usbdrive
move my_cool_big_file (copying to usbdrive...) ok
move my_cool_big_file (moving to usbdrive...) ok
# git annex move video/hackity_hack_and_kaxxt.mov --from home
move video/hackity_hack_and_kaxxt.mov (copying from home...)a
move video/hackity_hack_and_kaxxt.mov (moving from home...)
WORM:1274316523:86050597:hackity_hack_and_kax 100% 82MB 199.1KB/s 07:02
(dropping from home...) ok
ok
## using the URL backend