couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r712578 - in /incubator/couchdb/trunk: THANKS share/www/script/couch_tests.js src/couchdb/couch_rep.erl
Date Sun, 09 Nov 2008 22:39:27 GMT
Author: jchris
Date: Sun Nov  9 14:39:26 2008
New Revision: 712578

URL: http://svn.apache.org/viewvc?rev=712578&view=rev
Log:
apply replication fixing patches from COUCHDB-157

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

Modified: incubator/couchdb/trunk/THANKS
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/THANKS?rev=712578&r1=712577&r2=712578&view=diff
==============================================================================
--- incubator/couchdb/trunk/THANKS (original)
+++ incubator/couchdb/trunk/THANKS Sun Nov  9 14:39:26 2008
@@ -14,6 +14,7 @@
  * Michael Gottesman <gottesmm@reed.edu>
  * Michael Hendricks <michael@ndrix.org>
  * Till Klampaeckel <till@klampaeckel.de>
+ * Adam Kocoloski <adam.kocoloski@gmail.com>
  * Roger Leigh <rleigh@debian.org>
  * Jim Lindley <web@jimlindley.com>
  * Sam Ruby <rubys@intertwingly.net>

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=712578&r1=712577&r2=712578&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] Sun Nov  9 14:39:26 2008
@@ -1615,6 +1615,17 @@
         T(docA._rev == docB._rev);
       }
 
+      // check documents with a '/' in the ID
+      // need to re-encode the slash when replicating from a remote source
+      dbA.save({ _id:"abc/def", val:"one" });
+      
+      T(CouchDB.replicate(A, B).ok);
+      T(CouchDB.replicate(B, A).ok);
+      
+      docA = dbA.open("abc/def");
+      docB = dbB.open("abc/def");
+      T(docA._rev == docB._rev);
+      
       // now check binary attachments
       var binDoc = {
         _id:"bin_doc",

Modified: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_rep.erl?rev=712578&r1=712577&r2=712578&view=diff
==============================================================================
--- incubator/couchdb/trunk/src/couchdb/couch_rep.erl (original)
+++ incubator/couchdb/trunk/src/couchdb/couch_rep.erl Sun Nov  9 14:39:26 2008
@@ -343,7 +343,7 @@
             "latest=true"
         end, Options),
     RevsQueryStrs = lists:flatten(?JSON_ENCODE(Revs)),
-    Url = DbUrl ++ binary_to_list(DocId) ++ "?" ++ couch_util:implode(["revs=true", "attachments=true",
"open_revs=" ++ RevsQueryStrs ] ++ QueryOptionStrs, "&"),
+    Url = DbUrl ++ url_encode(DocId) ++ "?" ++ couch_util:implode(["revs=true", "attachments=true",
"open_revs=" ++ RevsQueryStrs ] ++ QueryOptionStrs, "&"),
     JsonResults = do_http_request(Url, get, []),
     Results =
     lists:map(



Mime
View raw message