diff --git a/Command/Status.hs b/Command/Status.hs index 8e41a96a9d..290ecd586a 100644 --- a/Command/Status.hs +++ b/Command/Status.hs @@ -17,8 +17,6 @@ import Data.Ord import System.PosixCompat.Files import Common.Annex -import qualified Types.Backend as B -import qualified Types.Remote as R import qualified Remote import qualified Command.Unused import qualified Git @@ -28,7 +26,6 @@ import Utility.DataUnits import Utility.DiskFree import Annex.Content import Types.Key -import Backend import Logs.UUID import Logs.Trust import Remote @@ -116,9 +113,7 @@ selStats fast_stats slow_stats = do -} global_fast_stats :: [Stat] global_fast_stats = - [ supported_backends - , supported_remote_types - , repository_mode + [ repository_mode , remote_list Trusted , remote_list SemiTrusted , remote_list UnTrusted @@ -171,14 +166,6 @@ showStat s = maybe noop calc =<< s (lift . showHeader) desc lift . showRaw =<< a -supported_backends :: Stat -supported_backends = stat "supported backends" $ json unwords $ - return $ map B.name Backend.list - -supported_remote_types :: Stat -supported_remote_types = stat "supported remote types" $ json unwords $ - return $ map R.typename Remote.remoteTypes - repository_mode :: Stat repository_mode = stat "repository mode" $ json id $ lift $ ifM isDirect diff --git a/Command/Version.hs b/Command/Version.hs index c8507cd5ac..b330d1ff10 100644 --- a/Command/Version.hs +++ b/Command/Version.hs @@ -12,6 +12,10 @@ import Command import qualified Build.SysConfig as SysConfig import Annex.Version import BuildFlags +import qualified Types.Backend as B +import qualified Types.Remote as R +import qualified Remote +import qualified Backend def :: [Command] def = [noCommit $ noRepo showPackageVersion $ dontCheck repoExists $ @@ -25,13 +29,20 @@ start = do v <- getVersion liftIO $ do showPackageVersion - putStrLn $ "local repository version: " ++ fromMaybe "unknown" v - putStrLn $ "default repository version: " ++ defaultVersion - putStrLn $ "supported repository versions: " ++ unwords supportedVersions - putStrLn $ "upgrade supported from repository versions: " ++ unwords upgradableVersions + info "local repository version" $ fromMaybe "unknown" v + info "default repository version" defaultVersion + info "supported repository versions" $ + unwords supportedVersions + info "upgrade supported from repository versions" $ + unwords upgradableVersions stop showPackageVersion :: IO () showPackageVersion = do - putStrLn $ "git-annex version: " ++ SysConfig.packageversion - putStrLn $ "build flags: " ++ unwords buildFlags + info "git-annex version" SysConfig.packageversion + info "build flags" $ unwords buildFlags + info "key/value backends" $ unwords $ map B.name Backend.list + info "remote types" $ unwords $ map R.typename Remote.remoteTypes + +info :: String -> String -> IO () +info k v = putStrLn $ k ++ ": " ++ v diff --git a/debian/changelog b/debian/changelog index 0fddf8f97f..2647a1ef8c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,8 @@ git-annex (4.20130921) UNRELEASED; urgency=low written by MacGPG. * assistant: More robust inotify handling; avoid crashing if a directory cannot be read. + * Moved list of backends and remote types from status to version + command. -- Joey Hess Sun, 22 Sep 2013 19:42:29 -0400