From 828f3f1b0c4cf8791c063c6a393797047084eee8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 30 Sep 2011 03:20:24 -0400 Subject: status: List all known repositories. --- Command/Status.hs | 12 ++++++++++-- debian/changelog | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Command/Status.hs b/Command/Status.hs index ad490cae8..07c0958bb 100644 --- a/Command/Status.hs +++ b/Command/Status.hs @@ -28,6 +28,8 @@ import Content import Types.Key import Locations import Backend +import UUID +import Remote -- a named computation that produces a statistic type Stat = StatState (Maybe (String, StatState String)) @@ -55,6 +57,7 @@ stats :: [Stat] stats = [ supported_backends , supported_remote_types + , remote_list , tmp_size , bad_data_size , local_annex_keys @@ -92,6 +95,11 @@ 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 + local_annex_size :: Stat local_annex_size = stat "local annex size" $ keySizeSum <$> cachedKeysPresent @@ -154,8 +162,8 @@ keySizeSum s = total ++ missingnote missingnote | missing == 0 = "" | otherwise = aside $ - "but " ++ show missing ++ - " keys have unknown size" + "+ " ++ show missing ++ + " keys of unknown size" staleSize :: String -> (Git.Repo -> FilePath) -> Stat staleSize label dirspec = do diff --git a/debian/changelog b/debian/changelog index 5354e710d..3bdd04451 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ git-annex (3.20110929) UNRELEASED; urgency=low * Various speed improvements gained by using ByteStrings. * Fix referring to remotes by uuid. + * status: List all known repositories. -- Joey Hess Thu, 29 Sep 2011 18:58:53 -0400 -- cgit v1.2.3