diff --git a/src/Vervis/API.hs b/src/Vervis/API.hs index 3496375..1304a98 100644 --- a/src/Vervis/API.hs +++ b/src/Vervis/API.hs @@ -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 diff --git a/src/Vervis/Federation/Ticket.hs b/src/Vervis/Federation/Ticket.hs index 48f7ad4..03bd11d 100644 --- a/src/Vervis/Federation/Ticket.hs +++ b/src/Vervis/Federation/Ticket.hs @@ -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