mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-29 01:54:50 +09:00
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
|
case ebundle of
|
||||||
Left _ -> throwE "MR bundle specified as a URI"
|
Left _ -> throwE "MR bundle specified as a URI"
|
||||||
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
||||||
|
case (typ, diffs) of
|
||||||
|
(PatchMediaTypeDarcs, _ :| _ : _) ->
|
||||||
|
throwE "More than one Darcs patch bundle provided"
|
||||||
|
_ -> return ()
|
||||||
return (branch, typ, diffs)
|
return (branch, typ, diffs)
|
||||||
where
|
where
|
||||||
checkBranch
|
checkBranch
|
||||||
|
@ -1477,6 +1481,10 @@ offerTicketC (Entity pidUser personUser) sharerUser summary audience ticket uTar
|
||||||
case ebundle of
|
case ebundle of
|
||||||
Left _ -> throwE "MR bundle specified as a URI"
|
Left _ -> throwE "MR bundle specified as a URI"
|
||||||
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
||||||
|
case (typ, diffs) of
|
||||||
|
(PatchMediaTypeDarcs, _ :| _ : _) ->
|
||||||
|
throwE "More than one Darcs patch bundle provided"
|
||||||
|
_ -> return ()
|
||||||
return (branch, typ, diffs)
|
return (branch, typ, diffs)
|
||||||
where
|
where
|
||||||
checkBranch h lu = do
|
checkBranch h lu = do
|
||||||
|
|
|
@ -154,6 +154,10 @@ checkOfferTicket author ticket uTarget = do
|
||||||
case ebundle of
|
case ebundle of
|
||||||
Left _ -> throwE "MR bundle specified as a URI"
|
Left _ -> throwE "MR bundle specified as a URI"
|
||||||
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
||||||
|
case (typ, diffs) of
|
||||||
|
(PatchMediaTypeDarcs, _ :| _ : _) ->
|
||||||
|
throwE "More than one Darcs patch bundle provided"
|
||||||
|
_ -> return ()
|
||||||
return (branch, typ, diffs)
|
return (branch, typ, diffs)
|
||||||
where
|
where
|
||||||
checkBranch h lu = do
|
checkBranch h lu = do
|
||||||
|
@ -611,6 +615,10 @@ checkCreateTicket author ticket muTarget = do
|
||||||
case ebundle of
|
case ebundle of
|
||||||
Left _ -> throwE "MR bundle specified as a URI"
|
Left _ -> throwE "MR bundle specified as a URI"
|
||||||
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
Right (hBundle, bundle) -> checkBundle hBundle bundle
|
||||||
|
case (typ, patches) of
|
||||||
|
(PatchMediaTypeDarcs, _ :| _ : _) ->
|
||||||
|
throwE "More than one Darcs patch bundle provided"
|
||||||
|
_ -> return ()
|
||||||
return (branch, typ, patches)
|
return (branch, typ, patches)
|
||||||
where
|
where
|
||||||
checkBranch
|
checkBranch
|
||||||
|
|
Loading…
Reference in a new issue