diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-01 20:50:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-01 20:50:46 -0400 |
commit | 56b5aa56f0fcbf28a532317cb81601bb6c41a114 (patch) | |
tree | f799552cefa80ec15a0ab5c4281f6530dc61cb47 /Command/Version.hs | |
parent | 2d8a1ba354653fb01f9f33ec126ca53d64200acf (diff) |
Moved list of backends and remote types from status to version command.
Diffstat (limited to 'Command/Version.hs')
-rw-r--r-- | Command/Version.hs | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Command/Version.hs b/Command/Version.hs index c8507cd5a..b330d1ff1 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 |