Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C341210096 for ; Fri, 7 Mar 2014 00:19:18 +0000 (UTC) Received: (qmail 38365 invoked by uid 500); 7 Mar 2014 00:18:23 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 37543 invoked by uid 500); 7 Mar 2014 00:17:58 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 36935 invoked by uid 99); 7 Mar 2014 00:17:45 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Mar 2014 00:17:45 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 00EAB93A1F6; Fri, 7 Mar 2014 00:17:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dch@apache.org To: commits@couchdb.apache.org Date: Fri, 07 Mar 2014 00:17:52 -0000 Message-Id: In-Reply-To: <9b6ec795d075458aa14b487352cd8036@git.apache.org> References: <9b6ec795d075458aa14b487352cd8036@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [09/50] [abbrv] couchdb commit: updated refs/heads/2041-update-ibrowse to 948e7d9 Send better error if user specifies key and keys closes COUCHDB-2053 Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2bc07840 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2bc07840 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2bc07840 Branch: refs/heads/2041-update-ibrowse Commit: 2bc0784030847cbbdd8998d3f135f91992768f6a Parents: e7fdc16 Author: Robert Newson Authored: Fri Feb 7 11:00:24 2014 +0000 Committer: Robert Newson Committed: Fri Feb 7 14:40:40 2014 +0000 ---------------------------------------------------------------------- src/couch_mrview/src/couch_mrview_util.erl | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/2bc07840/src/couch_mrview/src/couch_mrview_util.erl ---------------------------------------------------------------------- diff --git a/src/couch_mrview/src/couch_mrview_util.erl b/src/couch_mrview/src/couch_mrview_util.erl index c4272f8..95f7be4 100644 --- a/src/couch_mrview/src/couch_mrview_util.erl +++ b/src/couch_mrview/src/couch_mrview_util.erl @@ -359,11 +359,13 @@ validate_args(Args) -> _ -> mrverror(<<"`keys` must be an array of strings.">>) end, - case {Args#mrargs.keys, Args#mrargs.start_key} of - {undefined, _} -> ok; - {[], _} -> ok; - {[_|_], undefined} -> ok; - _ -> mrverror(<<"`start_key` is incompatible with `keys`">>) + case {Args#mrargs.keys, Args#mrargs.start_key, + Args#mrargs.end_key} of + {undefined, _, _} -> ok; + {[], _, _} -> ok; + {[_|_], undefined, undefined} -> ok; + _ -> mrverror(<<"`keys` is incompatible with `key`" + ", `start_key` and `end_key`">>) end, case Args#mrargs.start_key_docid of @@ -372,13 +374,6 @@ validate_args(Args) -> _ -> mrverror(<<"`start_key_docid` must be a string.">>) end, - case {Args#mrargs.keys, Args#mrargs.end_key} of - {undefined, _} -> ok; - {[], _} -> ok; - {[_|_], undefined} -> ok; - _ -> mrverror(<<"`end_key` is incompatible with `keys`">>) - end, - case Args#mrargs.end_key_docid of undefined -> ok; EKDocId0 when is_binary(EKDocId0) -> ok;