couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r810359 - in /couchdb/branches/0.10.x: ./ etc/default/couchdb src/couchdb/couch_rep.erl
Date Wed, 02 Sep 2009 04:50:24 GMT
Author: kocolosk
Date: Wed Sep  2 04:50:23 2009
New Revision: 810359

URL: http://svn.apache.org/viewvc?rev=810359&view=rev
Log:
merged continuous-after-normal replication fix (r810358) from trunk

Modified:
    couchdb/branches/0.10.x/   (props changed)
    couchdb/branches/0.10.x/etc/default/couchdb   (props changed)
    couchdb/branches/0.10.x/src/couchdb/couch_rep.erl

Propchange: couchdb/branches/0.10.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep  2 04:50:23 2009
@@ -3,4 +3,4 @@
 /couchdb/branches/form:729440-730015
 /couchdb/branches/list-iterator:782292-784593
 /couchdb/branches/tail_header:775760-778477
-/couchdb/trunk:806983,807208-807478,807771,808574,808632,808716,808876,809134,810350
+/couchdb/trunk:806983,807208-807478,807771,808574,808632,808716,808876,809134,810350,810358

Propchange: couchdb/branches/0.10.x/etc/default/couchdb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep  2 04:50:23 2009
@@ -3,5 +3,5 @@
 /couchdb/branches/form/etc/default/couchdb:729440-730015
 /couchdb/branches/list-iterator/etc/default/couchdb:782292-784593
 /couchdb/branches/tail_header/etc/default/couchdb:775760-778477
-/couchdb/trunk/etc/default/couchdb:806983,807208-807478,807771,808574,808632,808716,808876,809134,810350
+/couchdb/trunk/etc/default/couchdb:806983,807208-807478,807771,808574,808632,808716,808876,809134,810350,810358
 /incubator/couchdb/trunk/etc/default/couchdb:642419-694440

Modified: couchdb/branches/0.10.x/src/couchdb/couch_rep.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/0.10.x/src/couchdb/couch_rep.erl?rev=810359&r1=810358&r2=810359&view=diff
==============================================================================
--- couchdb/branches/0.10.x/src/couchdb/couch_rep.erl (original)
+++ couchdb/branches/0.10.x/src/couchdb/couch_rep.erl Wed Sep  2 04:50:23 2009
@@ -56,9 +56,9 @@
 
 %% function handling POST to _replicate
 replicate({Props}=PostBody, UserCtx) ->
-    RepId = make_replication_id(PostBody, UserCtx),
-    Replicator = {RepId,
-        {gen_server, start_link, [?MODULE, [RepId, PostBody, UserCtx], []]},
+    {BaseId, Extension} = make_replication_id(PostBody, UserCtx),
+    Replicator = {BaseId ++ Extension,
+        {gen_server, start_link, [?MODULE, [BaseId, PostBody, UserCtx], []]},
         transient,
         1,
         worker,
@@ -69,7 +69,7 @@
 
     case proplists:get_value(<<"continuous">>, Props, false) of
     true ->
-        {ok, {continuous, ?l2b(RepId)}};
+        {ok, {continuous, ?l2b(BaseId)}};
     false ->
         get_result(Server, PostBody, UserCtx)
     end.
@@ -361,7 +361,14 @@
     % Port = mochiweb_socket_server:get(couch_httpd, port),
     Src = get_rep_endpoint(UserCtx, proplists:get_value(<<"source">>, Props)),
     Tgt = get_rep_endpoint(UserCtx, proplists:get_value(<<"target">>, Props)),
   
-    couch_util:to_hex(erlang:md5(term_to_binary([HostName, Src, Tgt]))).
+    Base = couch_util:to_hex(erlang:md5(term_to_binary([HostName, Src, Tgt]))),
+    Extension = case proplists:get_value(<<"continuous">>, Props, false) of
+    true ->
+        "+continuous";
+    false ->
+        ""
+    end,
+    {Base, Extension}.
 
 maybe_add_trailing_slash(Url) ->
     re:replace(Url, "[^/]$", "&/", [{return, list}]).



Mime
View raw message