Author: jan
Date: Sat Mar 20 00:22:10 2010
New Revision: 925498
URL: http://svn.apache.org/viewvc?rev=925498&view=rev
Log:
backwards compatible ids for non-docid replications
Modified:
couchdb/branches/0.11.x/src/couchdb/couch_rep.erl
Modified: couchdb/branches/0.11.x/src/couchdb/couch_rep.erl
URL:
http://svn.apache.org/viewvc/couchdb/branches/0.11.x/src/couchdb/couch_rep.erl?rev=925498&r1=925497&r2=925498&view=diff
==============================================================================
--- couchdb/branches/0.11.x/src/couchdb/couch_rep.erl (original)
+++ couchdb/branches/0.11.x/src/couchdb/couch_rep.erl Sat Mar 20 00:22:10 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),