upgrade messages

This commit is contained in:
Joey Hess 2011-03-21 20:46:43 -04:00
parent 02c3f3880b
commit c048905dc4
3 changed files with 7 additions and 2 deletions

View file

@ -10,6 +10,7 @@ module Command.Upgrade where
import Command import Command
import Upgrade import Upgrade
import Version import Version
import Messages
command :: [Command] command :: [Command]
command = [standaloneCommand "upgrade" paramNothing seek command = [standaloneCommand "upgrade" paramNothing seek
@ -20,6 +21,7 @@ seek = [withNothing start]
start :: CommandStartNothing start :: CommandStartNothing
start = do start = do
showStart "upgrade" ""
r <- upgrade r <- upgrade
checkVersion checkVersion
return $ Just $ return $ Just $ return r return $ Just $ return $ Just $ return r

View file

@ -23,7 +23,7 @@ import qualified Upgrade.V1
upgrade :: Annex Bool upgrade :: Annex Bool
upgrade = do upgrade = do
showSideAction "Upgrading object directory layout v0 to v1..." showNote "v0 to v1..."
g <- Annex.gitRepo g <- Annex.gitRepo
-- do the reorganisation of the key files -- do the reorganisation of the key files

View file

@ -55,7 +55,7 @@ import qualified Command.Init
upgrade :: Annex Bool upgrade :: Annex Bool
upgrade = do upgrade = do
showSideAction "Upgrading object directory layout v1 to v2..." showNote "v1 to v2"
g <- Annex.gitRepo g <- Annex.gitRepo
if Git.repoIsLocalBare g if Git.repoIsLocalBare g
@ -78,6 +78,7 @@ upgrade = do
moveContent :: Annex () moveContent :: Annex ()
moveContent = do moveContent = do
showNote "moving content..."
keys <- getKeysPresent1 keys <- getKeysPresent1
forM_ keys move forM_ keys move
where where
@ -92,6 +93,7 @@ moveContent = do
updateSymlinks :: Annex () updateSymlinks :: Annex ()
updateSymlinks = do updateSymlinks = do
showNote "updating symlinks content..."
g <- Annex.gitRepo g <- Annex.gitRepo
files <- liftIO $ Git.inRepo g [Git.workTree g] files <- liftIO $ Git.inRepo g [Git.workTree g]
forM_ files $ fixlink forM_ files $ fixlink
@ -109,6 +111,7 @@ updateSymlinks = do
moveLocationLogs :: Annex () moveLocationLogs :: Annex ()
moveLocationLogs = do moveLocationLogs = do
showNote "moving location logs..."
logkeys <- oldlocationlogs logkeys <- oldlocationlogs
forM_ logkeys move forM_ logkeys move
where where