info: Mention when run in a dead repository.

This commit is contained in:
Joey Hess 2016-02-19 15:16:52 -04:00
parent ec198fec83
commit 8bb80748ef
Failed to extract signature
2 changed files with 5 additions and 0 deletions

View file

@ -22,6 +22,7 @@ import qualified Types.Remote as Remote
import Utility.DataUnits
import Utility.DiskFree
import Annex.Content
import Annex.UUID
import Logs.UUID
import Logs.Trust
import Logs.Location
@ -111,6 +112,9 @@ start o ps = do
globalInfo :: InfoOptions -> Annex ()
globalInfo o = do
u <- getUUID
whenM ((==) DeadTrusted <$> lookupTrust u) $
earlyWarning "Warning: This repository is currently marked as dead."
stats <- selStats global_fast_stats global_slow_stats
showCustom "info" $ do
evalStateT (mapM_ showStat stats) (emptyStatInfo o)