summaryrefslogtreecommitdiff
path: root/Command/Status.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Status.hs')
-rw-r--r--Command/Status.hs16
1 files changed, 11 insertions, 5 deletions
diff --git a/Command/Status.hs b/Command/Status.hs
index 53d64d042..e66f59858 100644
--- a/Command/Status.hs
+++ b/Command/Status.hs
@@ -24,6 +24,7 @@ import Annex.Content
import Types.Key
import Backend
import Logs.UUID
+import Logs.Trust
import Remote
-- a named computation that produces a statistic
@@ -52,7 +53,9 @@ stats :: [Stat]
stats =
[ supported_backends
, supported_remote_types
- , remote_list
+ , remote_list Trusted "trusted"
+ , remote_list UnTrusted "untrusted"
+ , remote_list SemiTrusted "semitrusted"
, tmp_size
, bad_data_size
, local_annex_keys
@@ -90,10 +93,13 @@ supported_remote_types :: Stat
supported_remote_types = stat "supported remote types" $
return $ unwords $ map R.typename Remote.remoteTypes
-remote_list :: Stat
-remote_list = stat "known repositories" $ lift $ do
- s <- prettyPrintUUIDs "repos" =<< M.keys <$> uuidMap
- return $ '\n':init s
+remote_list :: TrustLevel -> String -> Stat
+remote_list level desc = stat n $ lift $ do
+ us <- M.keys <$> uuidMap
+ s <- prettyPrintUUIDs n =<< fst <$> trustPartition level us
+ return $ if null s then "none" else '\n':init s
+ where
+ n = desc ++ " repositories"
local_annex_size :: Stat
local_annex_size = stat "local annex size" $