remove Utility.Conditional and use IfElse
This drops the >>! and >>? with the nice low fixity. IfElse does have undocumented >>=>>! and >>=>>? operators, but I deem that too fishy. Anyway, using whenM and unlessM is easier; I sometimes mixed the operators up.
This commit is contained in:
parent
ba6088b249
commit
ce5637498f
12 changed files with 23 additions and 40 deletions
|
@ -69,7 +69,7 @@ bupSetup u c = do
|
|||
-- bup init will create the repository.
|
||||
-- (If the repository already exists, bup init again appears safe.)
|
||||
showAction "bup init"
|
||||
bup "init" buprepo [] >>! error "bup init failed"
|
||||
unlessM (bup "init" buprepo []) $ error "bup init failed"
|
||||
|
||||
storeBupUUID u buprepo
|
||||
|
||||
|
@ -167,9 +167,9 @@ storeBupUUID u buprepo = do
|
|||
if Git.repoIsUrl r
|
||||
then do
|
||||
showAction "storing uuid"
|
||||
onBupRemote r boolSystem "git"
|
||||
[Params $ "config annex.uuid " ++ v]
|
||||
>>! error "ssh failed"
|
||||
unlessM (onBupRemote r boolSystem "git"
|
||||
[Params $ "config annex.uuid " ++ v]) $
|
||||
error "ssh failed"
|
||||
else liftIO $ do
|
||||
r' <- Git.Config.read r
|
||||
let olduuid = Git.Config.get "annex.uuid" "" r'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue