Moved list of backends and remote types from status to version command.

This commit is contained in:
Joey Hess 2013-10-01 20:50:46 -04:00
parent a05b763b01
commit 29385dc393
3 changed files with 20 additions and 20 deletions

View file

@ -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

View file

@ -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

2
debian/changelog vendored
View file

@ -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 <joeyh@debian.org> Sun, 22 Sep 2013 19:42:29 -0400