summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2010-03-20 00:22:04 +0000
committerJan Lehnardt <jan@apache.org>2010-03-20 00:22:04 +0000
commit25a3d8dfa982d6dd75bd96a42cf272400a2b38a3 (patch)
treefd582c1e42781f5be8a895b61a3e579ca0848122 /src/couchdb
parentdc842619158dcc7aa9d2adc4873a36ba511e3108 (diff)
backwards compatible ids for non-docid replications
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@925497 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_rep.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl
index 6e58ccbc..8e83ebca 100644
--- a/src/couchdb/couch_rep.erl
+++ b/src/couchdb/couch_rep.erl
@@ -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),