summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-05-17 01:59:44 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-05-17 01:59:44 -0400
commit75a3f5027f74565d909fb940893636d081d9872a (patch)
tree9a1c802878181ac30c36eafd752bb914230c28a3
parent33e6425d102af17f32593e87286aaf8b11a7e1d4 (diff)
tweak
-rw-r--r--Command/Status.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/Status.hs b/Command/Status.hs
index 39e230021..43a948443 100644
--- a/Command/Status.hs
+++ b/Command/Status.hs
@@ -11,6 +11,7 @@ import Control.Monad.State
import Data.Maybe
import System.IO
import Data.List
+import Data.Tuple
import qualified Data.Map as M
import qualified Annex
@@ -129,11 +130,10 @@ backend_usage :: Stat
backend_usage = stat "backend usage" $
return . usage =<< cachedKeysReferenced
where
- usage (ks, _) = pp "" $ sort $ map tflip $ splits ks
+ usage (ks, _) = pp "" $ sort $ map swap $ splits ks
splits :: [Key] -> [(String, Integer)]
splits ks = M.toList $ M.fromListWith (+) $ map tcount ks
tcount k = (keyBackendName k, 1)
- tflip (a, b) = (b, a)
pp c [] = c
pp c ((n, b):xs) = "\n\t" ++ b ++ ": " ++ show n ++ pp c xs