couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r709572 - in /incubator/couchdb/trunk: share/www/script/couch_tests.js src/couchdb/couch_doc.erl
Date Fri, 31 Oct 2008 21:21:06 GMT
Author: jchris
Date: Fri Oct 31 14:21:05 2008
New Revision: 709572

URL: http://svn.apache.org/viewvc?rev=709572&view=rev
Log:
fixed JSON regression about revs_info status

Modified:
    incubator/couchdb/trunk/share/www/script/couch_tests.js
    incubator/couchdb/trunk/src/couchdb/couch_doc.erl

Modified: incubator/couchdb/trunk/share/www/script/couch_tests.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/script/couch_tests.js?rev=709572&r1=709571&r2=709572&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/www/script/couch_tests.js [utf-8] (original)
+++ incubator/couchdb/trunk/share/www/script/couch_tests.js [utf-8] Fri Oct 31 14:21:05 2008
@@ -54,6 +54,10 @@
 
     var id = result.id; // save off the id for later
 
+    // make sure the revs_info status is good
+    var doc = db.open(id, {revs_info:true});
+    T(doc._revs_info[0].status == "available");
+
     // Create some more documents.
     // Notice the use of the ok member on the return result.
     T(db.save({_id:"1",a:2,b:4}).ok);

Modified: incubator/couchdb/trunk/src/couchdb/couch_doc.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_doc.erl?rev=709572&r1=709571&r2=709572&view=diff
==============================================================================
--- incubator/couchdb/trunk/src/couchdb/couch_doc.erl (original)
+++ incubator/couchdb/trunk/src/couchdb/couch_doc.erl Fri Oct 31 14:21:05 2008
@@ -39,7 +39,7 @@
         lists:map(
             fun({revs_info, RevsInfo}) ->
                 JsonRevsInfo =
-                [{[{rev, Rev}, {status, atom_to_list(Status)}]} ||
+                [{[{rev, Rev}, {status, list_to_binary(atom_to_list(Status))}]} ||
                     {Rev, Status} <- RevsInfo],
                 {<<"_revs_info">>, JsonRevsInfo};
             ({conflicts, Conflicts}) ->



Mime
View raw message