Removed the setkey command, and added a setcontent command with a more useful interface.

This commit is contained in:
Joey Hess 2011-10-31 12:33:41 -04:00
parent e09dd6f306
commit cc1ea8f844
6 changed files with 80 additions and 65 deletions

View file

@ -38,7 +38,7 @@ perform key file backend numcopies = check
[ verifyLocationLog key file
, checkKeySize key
, checkKeyNumCopies key file numcopies
, (Types.Backend.fsckKey backend) key
, checkBackend backend key
]
{- To fsck a bare repository, fsck each key in the location log. -}
@ -65,7 +65,7 @@ performBare :: Key -> Backend Annex -> CommandPerform
performBare key backend = check
[ verifyLocationLog key (show key)
, checkKeySize key
, (Types.Backend.fsckKey backend) key
, checkBackend backend key
]
check :: [Annex Bool] -> CommandPerform
@ -134,6 +134,9 @@ checkKeySize key = do
return False
checkBackend :: Backend Annex -> Key -> Annex Bool
checkBackend backend key = (Types.Backend.fsckKey backend) key
checkKeyNumCopies :: Key -> FilePath -> Maybe Int -> Annex Bool
checkKeyNumCopies key file numcopies = do
needed <- getNumCopies numcopies