diff options
author | 2013-11-14 17:04:58 -0400 | |
---|---|---|
committer | 2013-11-14 17:04:58 -0400 | |
commit | 521ef9dfebd6a9418a5dce7d1686dbf353ddd0a0 (patch) | |
tree | afe6bb5d52e21a049f04020ae448afb81adc02a7 /Command/Version.hs | |
parent | f4b4f327b69189d24663a7db6407c1f7a6e48fdd (diff) | |
parent | 5c6f6e4d0abb9b4856908a500611044b3b7a48e6 (diff) |
Merge branch 'master' into tasty-tests
Conflicts:
Test.hs
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 |