Repository: couchdb-fabric Updated Branches: refs/heads/master 19c273ac5 -> 19df05419
Revert "Module-wide s/proplists:get_value/couch_util:get_value/" Behaviour of `get_value/2,3` function of couch_util and proplists modules is completely different when searched key exists and is an atom, but there is no paired value for it: proplists function implicitly assumes that a value is `true` while couch_util returns `undefined` instead. Such replacement breaks any logic that depends on `true` or `undefined` result of the function call, so we need to be careful next time. This reverts commit 19c273ac54e8f1bec81be3b74c443ecafa01e599. Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/19df0541 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/19df0541 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/19df0541 Branch: refs/heads/master Commit: 19df05419048478a92c747cb5c20c0c7a0331f51 Parents: 19c273a Author: Alexander Shorin <[email protected]> Authored: Thu Jun 11 04:18:51 2015 +0300 Committer: Alexander Shorin <[email protected]> Committed: Thu Jun 11 04:43:47 2015 +0300 ---------------------------------------------------------------------- src/fabric.erl | 2 +- src/fabric_db_meta.erl | 2 +- src/fabric_doc_open.erl | 2 +- src/fabric_rpc.erl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/19df0541/src/fabric.erl ---------------------------------------------------------------------- diff --git a/src/fabric.erl b/src/fabric.erl index 1d92f91..c3a95fb 100644 --- a/src/fabric.erl +++ b/src/fabric.erl @@ -162,7 +162,7 @@ get_all_security(DbName, Options) -> {error, any()} | {error, any() | any()}. open_doc(DbName, Id, Options) -> - case couch_util:get_value(doc_info, Options) of + case proplists:get_value(doc_info, Options) of undefined -> fabric_doc_open:go(dbname(DbName), docid(Id), opts(Options)); Else -> http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/19df0541/src/fabric_db_meta.erl ---------------------------------------------------------------------- diff --git a/src/fabric_db_meta.erl b/src/fabric_db_meta.erl index f3ca60b..367ef06 100644 --- a/src/fabric_db_meta.erl +++ b/src/fabric_db_meta.erl @@ -121,7 +121,7 @@ check_sec_set_int(NumWorkers, SetWorkers) -> get_all_security(DbName, Options) -> - Shards = case couch_util:get_value(shards, Options) of + Shards = case proplists:get_value(shards, Options) of Shards0 when is_list(Shards0) -> Shards0; _ -> mem3:shards(DbName) end, http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/19df0541/src/fabric_doc_open.erl ---------------------------------------------------------------------- diff --git a/src/fabric_doc_open.erl b/src/fabric_doc_open.erl index ac3cbdb..1607946 100644 --- a/src/fabric_doc_open.erl +++ b/src/fabric_doc_open.erl @@ -30,7 +30,7 @@ go(DbName, Id, Options) -> - Handler = case couch_util:get_value(doc_info, Options) of + Handler = case proplists:get_value(doc_info, Options) of true -> get_doc_info; full -> get_full_doc_info; undefined -> open_doc http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/19df0541/src/fabric_rpc.erl ---------------------------------------------------------------------- diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl index 9ecb127..057dec3 100644 --- a/src/fabric_rpc.erl +++ b/src/fabric_rpc.erl @@ -203,7 +203,7 @@ get_missing_revs(DbName, IdRevsList, Options) -> end). update_docs(DbName, Docs0, Options) -> - case couch_util:get_value(replicated_changes, Options) of + case proplists:get_value(replicated_changes, Options) of true -> X = replicated_changes; _ ->
