summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-01 20:50:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-01 20:50:46 -0400
commit56b5aa56f0fcbf28a532317cb81601bb6c41a114 (patch)
treef799552cefa80ec15a0ab5c4281f6530dc61cb47
parent2d8a1ba354653fb01f9f33ec126ca53d64200acf (diff)
Moved list of backends and remote types from status to version command.
-rw-r--r--Command/Status.hs15
-rw-r--r--Command/Version.hs23
-rw-r--r--debian/changelog2
3 files changed, 20 insertions, 20 deletions
diff --git a/Command/Status.hs b/Command/Status.hs
index 8e41a96a9..290ecd586 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 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
diff --git a/debian/changelog b/debian/changelog
index 0fddf8f97..2647a1ef8 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 <joeyh@debian.org> Sun, 22 Sep 2013 19:42:29 -0400