git commit: maintain the file_exists idiom

2012-03-21 Thread randall
Updated Branches:
  refs/heads/1.2.x 25e079117 - af9e1c883


maintain the file_exists idiom

POSIX {error, eexist} from the file module needs to be kept from
bubbling all the way to couch_httpd or it will result in a 500 error
when a 412 is what we want.

This change confines all the database exists already conversion of
the {error, eexist} that now bubble out of couch_file contained within
couch_server.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/af9e1c88
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/af9e1c88
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/af9e1c88

Branch: refs/heads/1.2.x
Commit: af9e1c883ca4accb2097ac9d26efa4daf1fd
Parents: 25e0791
Author: Randall Leeds rand...@apache.org
Authored: Wed Mar 21 14:38:53 2012 -0700
Committer: Randall Leeds rand...@apache.org
Committed: Wed Mar 21 14:38:53 2012 -0700

--
 src/couchdb/couch_server.erl |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/couchdb/blob/af9e1c88/src/couchdb/couch_server.erl
--
diff --git a/src/couchdb/couch_server.erl b/src/couchdb/couch_server.erl
index 1185a20..440af62 100644
--- a/src/couchdb/couch_server.erl
+++ b/src/couchdb/couch_server.erl
@@ -323,6 +323,8 @@ handle_call({open_result, DbName, {ok, OpenedDbPid}, 
Options}, _From, Server) -
 ok
 end,
 {reply, ok, Server};
+handle_call({open_result, DbName, {error, eexist}, Options}, From, Server) -
+handle_call({open_result, DbName, file_exists, Options}, From, Server);
 handle_call({open_result, DbName, Error, Options}, _From, Server) -
 [{DbName, {opening,Opener,Froms}}] = ets:lookup(couch_dbs_by_name, DbName),
 lists:foreach(fun(From) -



git commit: maintain the file_exists idiom

2012-03-21 Thread randall
Updated Branches:
  refs/heads/1.1.x e567f110a - 3e2280bfd


maintain the file_exists idiom

POSIX {error, eexist} from the file module needs to be kept from
bubbling all the way to couch_httpd or it will result in a 500 error
when a 412 is what we want.

This change confines all the database exists already conversion of
the {error, eexist} that now bubble out of couch_file contained within
couch_server.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/3e2280bf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/3e2280bf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/3e2280bf

Branch: refs/heads/1.1.x
Commit: 3e2280bfd5e18983a1509382c4a42834b33bec45
Parents: e567f11
Author: Randall Leeds rand...@apache.org
Authored: Wed Mar 21 14:38:53 2012 -0700
Committer: Randall Leeds rand...@apache.org
Committed: Wed Mar 21 14:43:31 2012 -0700

--
 src/couchdb/couch_server.erl |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/couchdb/blob/3e2280bf/src/couchdb/couch_server.erl
--
diff --git a/src/couchdb/couch_server.erl b/src/couchdb/couch_server.erl
index 7870d69..957bdcb 100644
--- a/src/couchdb/couch_server.erl
+++ b/src/couchdb/couch_server.erl
@@ -284,6 +284,8 @@ handle_call({open_result, DbName, {ok, OpenedDbPid}, 
Options}, _From, Server) -
 ok
 end,
 {reply, ok, Server};
+handle_call({open_result, DbName, {error, eexist}, Options}, From, Server) -
+handle_call({open_result, DbName, file_exists, Options}, From, Server);
 handle_call({open_result, DbName, Error, Options}, _From, Server) -
 [{DbName, {opening,Opener,Froms}}] = ets:lookup(couch_dbs_by_name, DbName),
 lists:foreach(fun(From) -