anchor.diff:  
       _ ->
           % Replication using the _changes API (DB sequence update numbers).
  -        SourceLog = open_replication_log(Source, RepId),
  -        TargetLog = open_replication_log(Target, RepId),
  +
  +        [SourceLog, TargetLog] = find_replication_logs(
  +            [Source, Target], RepId, {PostProps}, UserCtx),
       
           {StartSeq, History} = compare_replication_logs(SourceLog, TargetLog),
   
  
positive.code: 
  -include("couch_db.hrl").
  
  -record(state, {
      changes_feed,
      missing_revs,
  
negative.code:         end
      end, [], Options).
  
  % Versioned clauses for generating replication ids
  % If a change is made to how replications are identified
  % add a new clause and increase ?REP_ID_VERSION at the top
  make_replication_id({Props}, UserCtx, 2) ->
      {ok, HostName} = inet:gethostname(),
      Port = mochiweb_socket_server:get(couch_httpd, port),
      Src = get_rep_endpoint(UserCtx, couch_util:get_value(<<"source">>, Props)),
      Tgt = get_rep_endpoint(UserCtx, couch_util:get_value(<<"target">>, Props)),
      maybe_append_filters({Props}, [HostName, Port, Src, Tgt]);
  make_replication_id({Props}, UserCtx, 1) ->
      {ok, HostName} = inet:gethostname(),
      Src = get_rep_endpoint(UserCtx, couch_util:get_value(<<"source">>, Props)),
      Tgt = get_rep_endpoint(UserCtx, couch_util:get_value(<<"target">>, Props)),
      maybe_append_filters({Props}, [HostName, Src, Tgt]).
  
  maybe_append_filters({Props}, Base) ->
      Base2 = Base ++ 
          case couch_util:get_value(<<"filter">>, Props) of
          undefined ->
              case couch_util:get_value(<<"doc_ids">>, Props) of
  