diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-14 16:14:17 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-14 16:14:17 -0400 |
commit | aa4fbbdd33c4d584b734476a341a0c38980281a6 (patch) | |
tree | 82bd06cee09db8cf4bb112652374e5e2df920ce0 | |
parent | 04edae6791b4eddaa77dda2407264dc4434d74b7 (diff) |
status: Now displays trusted, untrusted, and semitrusted repositories separately.
-rw-r--r-- | Command/Status.hs | 16 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | doc/bugs/wishlist:_query_things_like_description__44___trust_level.mdwn | 3 |
3 files changed, 16 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" $ diff --git a/debian/changelog b/debian/changelog index 7ff819a14..b49967fe9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ git-annex (3.20111112) UNRELEASED; urgency=low * init: When run in an already initalized repository, and without a description specified, don't delete the old description. * Optimised union merging; now only runs git cat-file once. + * status: Now displays trusted, untrusted, and semitrusted repositories + separately. -- Joey Hess <joeyh@debian.org> Sat, 12 Nov 2011 14:50:21 -0400 diff --git a/doc/bugs/wishlist:_query_things_like_description__44___trust_level.mdwn b/doc/bugs/wishlist:_query_things_like_description__44___trust_level.mdwn index 6404393a8..d158850cd 100644 --- a/doc/bugs/wishlist:_query_things_like_description__44___trust_level.mdwn +++ b/doc/bugs/wishlist:_query_things_like_description__44___trust_level.mdwn @@ -1 +1,4 @@ It would be helpful to have a way to query things like a repository's description and trust level, without having to poke in the git-annex branch. For example, "git annex describe ." currently clears the description but could print the current one instead. + +> `git annex status` now breaks down the repository list by type. [[done]] +> --[[Joey]] |