From dev-return-4226-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Fri May 15 14:55:28 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 24265 invoked from network); 15 May 2009 14:55:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 May 2009 14:55:28 -0000 Received: (qmail 57374 invoked by uid 500); 15 May 2009 14:55:27 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 57298 invoked by uid 500); 15 May 2009 14:55:27 -0000 Mailing-List: contact dev-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 dev@couchdb.apache.org Received: (qmail 57288 invoked by uid 99); 15 May 2009 14:55:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2009 14:55:27 +0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.68.5.15] (HELO relay01.pair.com) (209.68.5.15) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 15 May 2009 14:55:18 +0000 Received: (qmail 16802 invoked from network); 15 May 2009 14:54:55 -0000 Received: from 75.143.234.216 (HELO ?192.168.1.104?) (75.143.234.216) by relay01.pair.com with SMTP; 15 May 2009 14:54:55 -0000 X-pair-Authenticated: 75.143.234.216 Message-Id: From: Damien Katz To: dev@couchdb.apache.org In-Reply-To: <1FE79115-0103-4687-A631-712C735E5AC3@apache.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: svn commit: r774474 - in /couchdb/trunk: etc/couchdb/default.ini.tpl.in share/www/script/test/changes.js src/couchdb/couch_httpd_misc_handlers.erl src/couchdb/couch_query_servers.erl Date: Fri, 15 May 2009 10:54:56 -0400 References: <20090513182717.C25D423888AD@eris.apache.org> <67E484AA-DB00-44BE-8D3B-F1D762187CB0@apache.org> <1FE79115-0103-4687-A631-712C735E5AC3@apache.org> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org On May 13, 2009, at 9:39 PM, Jan Lehnardt wrote: > > On 14 May 2009, at 03:17, Damien Katz wrote: > >> We have to both block and merge commits? It seems like we should >> only need to do one or the other, but not both. > > We need block or merge a commit for any stable branch > (currently 0.9.x), depending on wether we like to have it > in the stable branch or not. I don't understand why. By default, fixes DO NOT go into the stable branch, unless they fix an critical bug of that branch. Instead of blocking patches, we should only merge patches that we need in the branch. > > We could just not merge it, but explicitly blocking it makes > working with SVN and keeping track of unmerged and > unblocked commits easier. I.e. we can differentiate between > commits that have been considered to not be backported and > commits that have not been considered at all. I don't see how that makes it easier, unless we decided at some point to merge everything from one branch over to another, but with some exceptions. But that's not how the stable branches should work, the exceptions should be the patches themselves, each one committed must be considered necessary. Otherwise, we have to do all this extra work it seems, and I don't see the point. -Damien > > Cheers > Jan > -- > Or a more geeky answer: A commit can be in one of three > states (for any given branch): Merged, blocked, and unprocessed. > A binary flag is not sufficient to record three states :) > > >> >> -Damien >> >> On May 13, 2009, at 8:54 PM, Jan Lehnardt wrote: >> >>> Hi Damien, >>> >>> Can you take care of blocking / merging commits from / to >>> branches/0.9.x or should somebody else look after it? I'd >>> volunteer. >>> >>> Cheers >>> Jan >>> -- >>> >>> >>> >>> On 13 May 2009, at 20:27, damien@apache.org wrote: >>> >>>> Author: damien >>>> Date: Wed May 13 18:27:11 2009 >>>> New Revision: 774474 >>>> >>>> URL: http://svn.apache.org/viewvc?rev=774474&view=rev >>>> Log: >>>> Adding testing for GET /_changes?continuous=true by adding a GET / >>>> _sleep?time=Msecs call, which allows the browser to process the >>>> waiting data on the other async XHR request. >>>> >>>> Modified: >>>> couchdb/trunk/etc/couchdb/default.ini.tpl.in >>>> couchdb/trunk/share/www/script/test/changes.js >>>> couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl >>>> couchdb/trunk/src/couchdb/couch_query_servers.erl >>>> >>>> Modified: couchdb/trunk/etc/couchdb/default.ini.tpl.in >>>> URL: http://svn.apache.org/viewvc/couchdb/trunk/etc/couchdb/default.ini.tpl.in?rev=774474&r1=774473&r2=774474&view=diff >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> --- couchdb/trunk/etc/couchdb/default.ini.tpl.in (original) >>>> +++ couchdb/trunk/etc/couchdb/default.ini.tpl.in Wed May 13 >>>> 18:27:11 2009 >>>> @@ -60,6 +60,7 @@ >>>> _restart = {couch_httpd_misc_handlers, handle_restart_req} >>>> _stats = {couch_httpd_stats_handlers, handle_stats_req} >>>> _log = {couch_httpd_misc_handlers, handle_log_req} >>>> +_sleep = {couch_httpd_misc_handlers, handle_sleep_req} >>>> >>>> [httpd_db_handlers] >>>> _compact = {couch_httpd_db, handle_compact_req} >>>> >>>> Modified: couchdb/trunk/share/www/script/test/changes.js >>>> URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/changes.js?rev=774474&r1=774473&r2=774474&view=diff >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> --- couchdb/trunk/share/www/script/test/changes.js (original) >>>> +++ couchdb/trunk/share/www/script/test/changes.js Wed May 13 >>>> 18:27:11 2009 >>>> @@ -10,29 +10,85 @@ >>>> // License for the specific language governing permissions and >>>> limitations under >>>> // the License. >>>> >>>> + >>>> couchTests.changes = function(debug) { >>>> var db = new CouchDB("test_suite_db"); >>>> db.deleteDb(); >>>> db.createDb(); >>>> if (debug) debugger; >>>> >>>> - >>>> - var req = CouchDB.newXhr(); >>>> - >>>> - req.open("GET", "/test_suite_db/_changes", false); >>>> - req.send(""); >>>> + var req = CouchDB.request("GET", "/test_suite_db/_changes"); >>>> var resp = JSON.parse(req.responseText); >>>> >>>> T(resp.results.length == 0 && resp.last_seq==0) >>>> >>>> - var doc = {_id:"foo", bar:1}; >>>> - db.save(doc); >>>> + var docFoo = {_id:"foo", bar:1}; >>>> + db.save(docFoo); >>>> >>>> - req.open("GET", "/test_suite_db/_changes", false); >>>> - req.send(""); >>>> + req = CouchDB.request("GET", "/test_suite_db/_changes"); >>>> var resp = JSON.parse(req.responseText); >>>> >>>> T(resp.results.length == 1 && resp.last_seq==1) >>>> - T(resp.results[0].changes[0].rev == doc._rev) >>>> + T(resp.results[0].changes[0].rev == docFoo._rev) >>>> + >>>> + var xhr; >>>> + >>>> + try { >>>> + xhr = CouchDB.newXhr(); >>>> + } catch (err) { >>>> + } >>>> + >>>> + if (xhr) { >>>> + // Only test the continuous stuff if we have a real XHR object >>>> + // with real async support. >>>> + >>>> + var sleep = function(msecs) { >>>> + // by making a slow sync request, weallows the waiting XHR >>>> request data >>>> + // to be received. >>>> + var req = CouchDB.request("GET", "/_sleep?time=" + msecs); >>>> + T(JSON.parse(req.responseText).ok == true); >>>> + } >>>> + >>>> + var parse_changes_line = function(line) { >>>> + if (line.charAt(line.length-1) == ",") { >>>> + line = line.substring(0, line.length-1); >>>> + } >>>> + return JSON.parse(line); >>>> + } >>>> + >>>> + xhr.open("GET", "/test_suite_db/_changes?continuous=true", >>>> true); >>>> + xhr.send(""); >>>> + >>>> + var docBar = {_id:"bar", bar:1}; >>>> + db.save(docBar); >>>> + >>>> + sleep(100); >>>> + var lines = xhr.responseText.split("\n"); >>>> + >>>> + T(lines[0]='{"results":['); >>>> + >>>> + var change = parse_changes_line(lines[1]); >>>> + >>>> + T(change.seq == 1) >>>> + T(change.id == "foo") >>>> + >>>> + change = parse_changes_line(lines[2]); >>>> + >>>> + T(change.seq == 2) >>>> + T(change.id == "bar") >>>> + T(change.changes[0].rev == docBar._rev) >>>> + >>>> + var docBaz = {_id:"baz", baz:1}; >>>> + db.save(docBaz); >>>> + >>>> + sleep(100); >>>> + var lines = xhr.responseText.split("\n"); >>>> + >>>> + change = parse_changes_line(lines[3]); >>>> + >>>> + T(change.seq == 3); >>>> + T(change.id == "baz"); >>>> + T(change.changes[0].rev == docBaz._rev); >>>> >>>> + } >>>> }; >>>> >>>> Modified: couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl >>>> URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl?rev=774474&r1=774473&r2=774474&view=diff >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> --- couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl >>>> (original) >>>> +++ couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl Wed >>>> May 13 18:27:11 2009 >>>> @@ -15,7 +15,7 @@ >>>> -export([handle_welcome_req/2,handle_favicon_req/ >>>> 2,handle_utils_dir_req/2, >>>> handle_all_dbs_req/1,handle_replicate_req/1,handle_restart_req/1, >>>> handle_uuids_req/1,handle_config_req/1,handle_log_req/1, >>>> - handle_task_status_req/1]). >>>> + handle_task_status_req/1,handle_sleep_req/1]). >>>> >>>> -export([increment_update_seq_req/2]). >>>> >>>> @@ -56,6 +56,12 @@ >>>> handle_utils_dir_req(Req, _) -> >>>> send_method_not_allowed(Req, "GET,HEAD"). >>>> >>>> +handle_sleep_req(#httpd{method='GET'}=Req) -> >>>> + Time = list_to_integer(couch_httpd:qs_value(Req, "time")), >>>> + receive snicklefart -> ok after Time -> ok end, >>>> + send_json(Req, {[{ok, true}]}); >>>> +handle_sleep_req(Req) -> >>>> + send_method_not_allowed(Req, "GET,HEAD"). >>>> >>>> handle_all_dbs_req(#httpd{method='GET'}=Req) -> >>>> {ok, DbNames} = couch_server:all_databases(), >>>> >>>> Modified: couchdb/trunk/src/couchdb/couch_query_servers.erl >>>> URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_query_servers.erl?rev=774474&r1=774473&r2=774474&view=diff >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> --- couchdb/trunk/src/couchdb/couch_query_servers.erl (original) >>>> +++ couchdb/trunk/src/couchdb/couch_query_servers.erl Wed May 13 >>>> 18:27:11 2009 >>>> @@ -278,7 +278,7 @@ >>>> [{Pid, Lang}] -> >>>> case Status of >>>> normal -> ok; >>>> - _ -> ?LOG_DEBUG("Linked process died abnromally: ~p >>>> (reason: ~p)", [Pid, Status]) >>>> + _ -> ?LOG_DEBUG("Linked process died abnormally: ~p >>>> (reason: ~p)", [Pid, Status]) >>>> end, >>>> {ok, { >>>> Langs, >>>> >>>> >>>> >>> >> >> >