summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-30 03:20:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-30 03:20:24 -0400
commit828f3f1b0c4cf8791c063c6a393797047084eee8 (patch)
treee7e040cce037188b5a250d3d80f1d70a0dbcc935
parent8c5e29ad05e698be6983b69863fbecfdc44bbdd5 (diff)
status: List all known repositories.
-rw-r--r--Command/Status.hs12
-rw-r--r--debian/changelog1
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 <joeyh@debian.org> Thu, 29 Sep 2011 18:58:53 -0400