couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r925497 - /couchdb/trunk/src/couchdb/couch_rep.erl
Date Sat, 20 Mar 2010 00:22:05 GMT
Author: jan
Date: Sat Mar 20 00:22:04 2010
New Revision: 925497

URL: http://svn.apache.org/viewvc?rev=925497&view=rev
Log:
backwards compatible ids for non-docid replications

Modified:
    couchdb/trunk/src/couchdb/couch_rep.erl

Modified: couchdb/trunk/src/couchdb/couch_rep.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_rep.erl?rev=925497&r1=925496&r2=925497&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_rep.erl (original)
+++ couchdb/trunk/src/couchdb/couch_rep.erl Sat Mar 20 00:22:04 2010
@@ -455,7 +455,12 @@ make_replication_id({Props}, UserCtx) ->
     QueryParams = proplists:get_value(<<"query_params">>, Props),
     DocIds = proplists:get_value(<<"doc_ids">>, Props),
     Base = couch_util:to_hex(erlang:md5(
-        term_to_binary([HostName, Src, Tgt, Filter, QueryParams, DocIds])
+        case DocIds of
+        undefined ->
+            term_to_binary([HostName, Src, Tgt, Filter, QueryParams]);
+        DocIds ->
+            term_to_binary([HostName, Src, Tgt, Filter, QueryParams, DocIds])
+        end
     )),
     Extension = maybe_append_options(
         [<<"continuous">>, <<"create_target">>], Props),



Mime
View raw message