Moved list of backends and remote types from status to version command.
This commit is contained in:
parent
a05b763b01
commit
29385dc393
3 changed files with 20 additions and 20 deletions
|
@ -17,8 +17,6 @@ import Data.Ord
|
||||||
import System.PosixCompat.Files
|
import System.PosixCompat.Files
|
||||||
|
|
||||||
import Common.Annex
|
import Common.Annex
|
||||||
import qualified Types.Backend as B
|
|
||||||
import qualified Types.Remote as R
|
|
||||||
import qualified Remote
|
import qualified Remote
|
||||||
import qualified Command.Unused
|
import qualified Command.Unused
|
||||||
import qualified Git
|
import qualified Git
|
||||||
|
@ -28,7 +26,6 @@ import Utility.DataUnits
|
||||||
import Utility.DiskFree
|
import Utility.DiskFree
|
||||||
import Annex.Content
|
import Annex.Content
|
||||||
import Types.Key
|
import Types.Key
|
||||||
import Backend
|
|
||||||
import Logs.UUID
|
import Logs.UUID
|
||||||
import Logs.Trust
|
import Logs.Trust
|
||||||
import Remote
|
import Remote
|
||||||
|
@ -116,9 +113,7 @@ selStats fast_stats slow_stats = do
|
||||||
-}
|
-}
|
||||||
global_fast_stats :: [Stat]
|
global_fast_stats :: [Stat]
|
||||||
global_fast_stats =
|
global_fast_stats =
|
||||||
[ supported_backends
|
[ repository_mode
|
||||||
, supported_remote_types
|
|
||||||
, repository_mode
|
|
||||||
, remote_list Trusted
|
, remote_list Trusted
|
||||||
, remote_list SemiTrusted
|
, remote_list SemiTrusted
|
||||||
, remote_list UnTrusted
|
, remote_list UnTrusted
|
||||||
|
@ -171,14 +166,6 @@ showStat s = maybe noop calc =<< s
|
||||||
(lift . showHeader) desc
|
(lift . showHeader) desc
|
||||||
lift . showRaw =<< a
|
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 = stat "repository mode" $ json id $ lift $
|
repository_mode = stat "repository mode" $ json id $ lift $
|
||||||
ifM isDirect
|
ifM isDirect
|
||||||
|
|
|
@ -12,6 +12,10 @@ import Command
|
||||||
import qualified Build.SysConfig as SysConfig
|
import qualified Build.SysConfig as SysConfig
|
||||||
import Annex.Version
|
import Annex.Version
|
||||||
import BuildFlags
|
import BuildFlags
|
||||||
|
import qualified Types.Backend as B
|
||||||
|
import qualified Types.Remote as R
|
||||||
|
import qualified Remote
|
||||||
|
import qualified Backend
|
||||||
|
|
||||||
def :: [Command]
|
def :: [Command]
|
||||||
def = [noCommit $ noRepo showPackageVersion $ dontCheck repoExists $
|
def = [noCommit $ noRepo showPackageVersion $ dontCheck repoExists $
|
||||||
|
@ -25,13 +29,20 @@ start = do
|
||||||
v <- getVersion
|
v <- getVersion
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
showPackageVersion
|
showPackageVersion
|
||||||
putStrLn $ "local repository version: " ++ fromMaybe "unknown" v
|
info "local repository version" $ fromMaybe "unknown" v
|
||||||
putStrLn $ "default repository version: " ++ defaultVersion
|
info "default repository version" defaultVersion
|
||||||
putStrLn $ "supported repository versions: " ++ unwords supportedVersions
|
info "supported repository versions" $
|
||||||
putStrLn $ "upgrade supported from repository versions: " ++ unwords upgradableVersions
|
unwords supportedVersions
|
||||||
|
info "upgrade supported from repository versions" $
|
||||||
|
unwords upgradableVersions
|
||||||
stop
|
stop
|
||||||
|
|
||||||
showPackageVersion :: IO ()
|
showPackageVersion :: IO ()
|
||||||
showPackageVersion = do
|
showPackageVersion = do
|
||||||
putStrLn $ "git-annex version: " ++ SysConfig.packageversion
|
info "git-annex version" SysConfig.packageversion
|
||||||
putStrLn $ "build flags: " ++ unwords buildFlags
|
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
2
debian/changelog
vendored
|
@ -32,6 +32,8 @@ git-annex (4.20130921) UNRELEASED; urgency=low
|
||||||
written by MacGPG.
|
written by MacGPG.
|
||||||
* assistant: More robust inotify handling; avoid crashing if a directory
|
* assistant: More robust inotify handling; avoid crashing if a directory
|
||||||
cannot be read.
|
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
|
-- Joey Hess <joeyh@debian.org> Sun, 22 Sep 2013 19:42:29 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue