status: List all known repositories.
This commit is contained in:
parent
8c5e29ad05
commit
828f3f1b0c
2 changed files with 11 additions and 2 deletions
|
@ -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
|
||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue