make everything build again after ByteString Key changes

This commit is contained in:
Joey Hess 2019-01-11 16:34:04 -04:00
parent 151562b537
commit 727767e1e2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
23 changed files with 79 additions and 72 deletions

View file

@ -89,10 +89,10 @@ showFormatted format unformatted vars =
keyVars :: Key -> [(String, String)]
keyVars key =
[ ("key", key2file key)
, ("backend", formatKeyVariety $ keyVariety key)
, ("backend", decodeBS $ formatKeyVariety $ keyVariety key)
, ("bytesize", size show)
, ("humansize", size $ roughSize storageUnits True)
, ("keyname", keyName key)
, ("keyname", decodeBS $ keyName key)
, ("hashdirlower", hashDirLower def key)
, ("hashdirmixed", hashDirMixed def key)
, ("mtime", whenavail show $ keyMtime key)

View file

@ -250,7 +250,7 @@ verifyLocationLog key keystatus ai = do
- config was set. -}
when (present && not (cryptographicallySecure (keyVariety key))) $
whenM (annexSecureHashesOnly <$> Annex.getGitConfig) $
warning $ "** Despite annex.securehashesonly being set, " ++ obj ++ " has content present in the annex using an insecure " ++ formatKeyVariety (keyVariety key) ++ " key"
warning $ "** Despite annex.securehashesonly being set, " ++ obj ++ " has content present in the annex using an insecure " ++ decodeBS (formatKeyVariety (keyVariety key)) ++ " key"
{- In direct mode, modified files will show up as not present,
- but that is expected and not something to do anything about. -}
@ -424,7 +424,7 @@ checkKeyUpgrade backend key ai (AssociatedFile (Just file)) =
[ actionItemDesc ai key
, ": Can be upgraded to an improved key format. "
, "You can do so by running: git annex migrate --backend="
, formatKeyVariety (keyVariety key) ++ " "
, decodeBS (formatKeyVariety (keyVariety key)) ++ " "
, file
]
return True

View file

@ -481,7 +481,7 @@ disk_size = simpleStat "available local disk space" $
backend_usage :: Stat
backend_usage = stat "backend usage" $ json fmt $
ObjectMap . (M.mapKeys formatKeyVariety) . backendsKeys
ObjectMap . (M.mapKeys (decodeBS . formatKeyVariety)) . backendsKeys
<$> cachedReferencedData
where
fmt = multiLine . map (\(b, n) -> b ++ ": " ++ show n) . sort . M.toList . fromObjectMap

View file

@ -59,7 +59,7 @@ showPackageVersion = do
vinfo "build flags" $ unwords buildFlags
vinfo "dependency versions" $ unwords dependencyVersions
vinfo "key/value backends" $ unwords $
map (formatKeyVariety . B.backendVariety) Backend.list
map (decodeBS . formatKeyVariety . B.backendVariety) Backend.list
vinfo "remote types" $ unwords $ map R.typename Remote.remoteTypes
vinfo "operating system" $ unwords [os, arch]
vinfo "supported repository versions" $