Don't accept Darcs MRs with more than one patch bundle file
This commit is contained in:
parent
cb11ea6447
commit
32adee0a75
2 changed files with 16 additions and 0 deletions
|
@ -689,6 +689,10 @@ createTicketC (Entity pidUser personUser) sharerUser summary audience ticket muT
|
|||
case ebundle of
|
||||
Left _ -> throwE "MR bundle specified as a URI"
|
||||
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
||||
case (typ, diffs) of
|
||||
(PatchMediaTypeDarcs, _ :| _ : _) ->
|
||||
throwE "More than one Darcs patch bundle provided"
|
||||
_ -> return ()
|
||||
return (branch, typ, diffs)
|
||||
where
|
||||
checkBranch
|
||||
|
@ -1477,6 +1481,10 @@ offerTicketC (Entity pidUser personUser) sharerUser summary audience ticket uTar
|
|||
case ebundle of
|
||||
Left _ -> throwE "MR bundle specified as a URI"
|
||||
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
||||
case (typ, diffs) of
|
||||
(PatchMediaTypeDarcs, _ :| _ : _) ->
|
||||
throwE "More than one Darcs patch bundle provided"
|
||||
_ -> return ()
|
||||
return (branch, typ, diffs)
|
||||
where
|
||||
checkBranch h lu = do
|
||||
|
|
|
@ -154,6 +154,10 @@ checkOfferTicket author ticket uTarget = do
|
|||
case ebundle of
|
||||
Left _ -> throwE "MR bundle specified as a URI"
|
||||
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
||||
case (typ, diffs) of
|
||||
(PatchMediaTypeDarcs, _ :| _ : _) ->
|
||||
throwE "More than one Darcs patch bundle provided"
|
||||
_ -> return ()
|
||||
return (branch, typ, diffs)
|
||||
where
|
||||
checkBranch h lu = do
|
||||
|
@ -611,6 +615,10 @@ checkCreateTicket author ticket muTarget = do
|
|||
case ebundle of
|
||||
Left _ -> throwE "MR bundle specified as a URI"
|
||||
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
||||
case (typ, patches) of
|
||||
(PatchMediaTypeDarcs, _ :| _ : _) ->
|
||||
throwE "More than one Darcs patch bundle provided"
|
||||
_ -> return ()
|
||||
return (branch, typ, patches)
|
||||
where
|
||||
checkBranch
|
||||
|
|
Loading…
Reference in a new issue