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 Types.Key
|
||||||
import Locations
|
import Locations
|
||||||
import Backend
|
import Backend
|
||||||
|
import UUID
|
||||||
|
import Remote
|
||||||
|
|
||||||
-- a named computation that produces a statistic
|
-- a named computation that produces a statistic
|
||||||
type Stat = StatState (Maybe (String, StatState String))
|
type Stat = StatState (Maybe (String, StatState String))
|
||||||
|
@ -55,6 +57,7 @@ stats :: [Stat]
|
||||||
stats =
|
stats =
|
||||||
[ supported_backends
|
[ supported_backends
|
||||||
, supported_remote_types
|
, supported_remote_types
|
||||||
|
, remote_list
|
||||||
, tmp_size
|
, tmp_size
|
||||||
, bad_data_size
|
, bad_data_size
|
||||||
, local_annex_keys
|
, local_annex_keys
|
||||||
|
@ -92,6 +95,11 @@ supported_remote_types :: Stat
|
||||||
supported_remote_types = stat "supported remote types" $
|
supported_remote_types = stat "supported remote types" $
|
||||||
return $ unwords $ map R.typename Remote.remoteTypes
|
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 = stat "local annex size" $
|
local_annex_size = stat "local annex size" $
|
||||||
keySizeSum <$> cachedKeysPresent
|
keySizeSum <$> cachedKeysPresent
|
||||||
|
@ -154,8 +162,8 @@ keySizeSum s = total ++ missingnote
|
||||||
missingnote
|
missingnote
|
||||||
| missing == 0 = ""
|
| missing == 0 = ""
|
||||||
| otherwise = aside $
|
| otherwise = aside $
|
||||||
"but " ++ show missing ++
|
"+ " ++ show missing ++
|
||||||
" keys have unknown size"
|
" keys of unknown size"
|
||||||
|
|
||||||
staleSize :: String -> (Git.Repo -> FilePath) -> Stat
|
staleSize :: String -> (Git.Repo -> FilePath) -> Stat
|
||||||
staleSize label dirspec = do
|
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.
|
* Various speed improvements gained by using ByteStrings.
|
||||||
* Fix referring to remotes by uuid.
|
* Fix referring to remotes by uuid.
|
||||||
|
* status: List all known repositories.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Thu, 29 Sep 2011 18:58:53 -0400
|
-- Joey Hess <joeyh@debian.org> Thu, 29 Sep 2011 18:58:53 -0400
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue