From commits-return-5271-apmail-couchdb-commits-archive=couchdb.apache.org@couchdb.apache.org Tue Oct 05 09:55:47 2010 Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 37056 invoked from network); 5 Oct 2010 09:55:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Oct 2010 09:55:46 -0000 Received: (qmail 45140 invoked by uid 500); 5 Oct 2010 09:55:46 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 45021 invoked by uid 500); 5 Oct 2010 09:55:45 -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 45014 invoked by uid 99); 5 Oct 2010 09:55:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Oct 2010 09:55:44 +0000 X-ASF-Spam-Status: No, hits=-1996.4 required=10.0 tests=ALL_TRUSTED,FS_REPLICA X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Oct 2010 09:55:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4250C2388A40; Tue, 5 Oct 2010 09:55:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1004597 - in /couchdb/branches/new_replicator/src/couchdb: couch_api_wrap.erl couch_api_wrap_httpc.erl Date: Tue, 05 Oct 2010 09:55:24 -0000 To: commits@couchdb.apache.org From: fdmanana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101005095524.4250C2388A40@eris.apache.org> Author: fdmanana Date: Tue Oct 5 09:55:23 2010 New Revision: 1004597 URL: http://svn.apache.org/viewvc?rev=1004597&view=rev Log: New replicator: removed obsolete code. Modified: couchdb/branches/new_replicator/src/couchdb/couch_api_wrap.erl couchdb/branches/new_replicator/src/couchdb/couch_api_wrap_httpc.erl Modified: couchdb/branches/new_replicator/src/couchdb/couch_api_wrap.erl URL: http://svn.apache.org/viewvc/couchdb/branches/new_replicator/src/couchdb/couch_api_wrap.erl?rev=1004597&r1=1004596&r2=1004597&view=diff ============================================================================== --- couchdb/branches/new_replicator/src/couchdb/couch_api_wrap.erl (original) +++ couchdb/branches/new_replicator/src/couchdb/couch_api_wrap.erl Tue Oct 5 09:55:23 2010 @@ -72,20 +72,19 @@ db_open(Db, Options) -> db_open(Db, Options, false). db_open(#httpdb{} = Db, _Options, Create) -> - {ok, Db2} = httpdb_setup(Db), case Create of false -> ok; true -> - send_req(Db2, [{method, put}], fun(_, _, _) -> ok end) + send_req(Db, [{method, put}], fun(_, _, _) -> ok end) end, - send_req(Db2, [{method, head}], + send_req(Db, [{method, head}], fun(200, _, _) -> - {ok, Db2}; + {ok, Db}; (401, _, _) -> throw({unauthorized, ?l2b(db_uri(Db))}); (_, _, _) -> - throw({db_not_found, ?l2b(Db2#httpdb.url)}) + throw({db_not_found, ?l2b(Db#httpdb.url)}) end); db_open(DbName, Options, Create) -> case Create of Modified: couchdb/branches/new_replicator/src/couchdb/couch_api_wrap_httpc.erl URL: http://svn.apache.org/viewvc/couchdb/branches/new_replicator/src/couchdb/couch_api_wrap_httpc.erl?rev=1004597&r1=1004596&r2=1004597&view=diff ============================================================================== --- couchdb/branches/new_replicator/src/couchdb/couch_api_wrap_httpc.erl (original) +++ couchdb/branches/new_replicator/src/couchdb/couch_api_wrap_httpc.erl Tue Oct 5 09:55:23 2010 @@ -16,7 +16,6 @@ -include("couch_api_wrap.hrl"). -include("../ibrowse/ibrowse.hrl"). --export([httpdb_setup/1]). -export([send_req/3]). -import(couch_util, [ @@ -25,11 +24,6 @@ ]). -httpdb_setup(#httpdb{} = Db) -> - % TODO: setup Ibrowse proxy options - {ok, Db}. - - send_req(#httpdb{headers = BaseHeaders} = HttpDb, Params, Callback) -> Method = get_value(method, Params, get), Headers1 = get_value(headers, Params, []),