diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-30 03:20:24 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-30 03:20:24 -0400 |
commit | 828f3f1b0c4cf8791c063c6a393797047084eee8 (patch) | |
tree | e7e040cce037188b5a250d3d80f1d70a0dbcc935 /Command/Status.hs | |
parent | 8c5e29ad05e698be6983b69863fbecfdc44bbdd5 (diff) |
status: List all known repositories.
Diffstat (limited to 'Command/Status.hs')
-rw-r--r-- | Command/Status.hs | 12 |
1 files changed, 10 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 |