diff options
author | Joey Hess <joeyh@joeyh.name> | 2014-12-29 15:35:14 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2014-12-29 15:35:14 -0400 |
commit | d2ab3a49e0fb5aa29619611e88635c7eb3baae4b (patch) | |
tree | 4d11b462fa31d9e51b8f23d7b54972efb451e7a7 | |
parent | cdb6196ab7a6b7d9602512fcc745e9dab61a9ce8 (diff) |
cleanup
-rw-r--r-- | Command/SetPresentKey.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Command/SetPresentKey.hs b/Command/SetPresentKey.hs index 94b442e22..4e2cdc5a9 100644 --- a/Command/SetPresentKey.hs +++ b/Command/SetPresentKey.hs @@ -9,13 +9,12 @@ module Command.SetPresentKey where import Common.Annex import Command -import qualified Annex import Logs.Location import Logs.Presence.Pure import Types.Key cmd :: [Command] -cmd = [noCommit $ command "setpresentkey" (paramPair paramKey "[1|0]") seek +cmd = [noCommit $ command "setpresentkey" (paramPair paramKey (paramPair paramUUID "[1|0]")) seek SectionPlumbing "change records of where key is present"] seek :: CommandSeek @@ -24,13 +23,13 @@ seek = withWords start start :: [String] -> CommandStart start (ks:us:vs:[]) = do showStart' "setpresentkey" k Nothing - next $ perform k (toUUID us) status + next $ perform k (toUUID us) s where k = fromMaybe (error "bad key") (file2key ks) - status = fromMaybe (error "bad value") (parseStatus vs) + s = fromMaybe (error "bad value") (parseStatus vs) start _ = error "Wrong number of parameters" perform :: Key -> UUID -> LogStatus -> CommandPerform -perform k u status = next $ do - logChange k u status +perform k u s = next $ do + logChange k u s return True |