incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <janlehna...@googlemail.com>
Subject Re: svn commit: r811868 - /couchdb/trunk/src/couchdb/couch_rep.erl
Date Mon, 07 Sep 2009 09:06:51 GMT

On 6 Sep 2009, at 21:30, kocolosk@apache.org wrote:

> Author: kocolosk
> Date: Sun Sep  6 19:30:23 2009
> New Revision: 811868
>
> URL: http://svn.apache.org/viewvc?rev=811868&view=rev
> Log:
> check if either history is empty, not both
>
> Modified:
>    couchdb/trunk/src/couchdb/couch_rep.erl

Hi Adam, good catch!

Neither make check nor the test suite caught this one. Is it possible  
to write a test for this?

Cheers
Jan
--


>
> Modified: couchdb/trunk/src/couchdb/couch_rep.erl
> URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_rep.erl?rev=811868&r1=811867&r2=811868&view=diff
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- couchdb/trunk/src/couchdb/couch_rep.erl (original)
> +++ couchdb/trunk/src/couchdb/couch_rep.erl Sun Sep  6 19:30:23 2009
> @@ -268,7 +268,7 @@
>         compare_rep_history(SourceHistory, TargetHistory)
>     end.
>
> -compare_rep_history([], []) ->
> +compare_rep_history(S, T) when S =:= [] orelse T =:= [] ->
>     ?LOG_INFO("no common ancestry -- performing full replication",  
> []),
>     {0, []};
> compare_rep_history([{S}|SourceRest], [{T}|TargetRest]=Target) ->
>
>


Mime
View raw message