anchor.diff:  
   %% function handling POST to _replicate
   replicate({Props}=PostBody, UserCtx) ->
  -    {BaseId, Extension} = make_replication_id(PostBody, UserCtx),
  +    BaseId = make_replication_id({Props}, UserCtx, ?REP_ID_VERSION),
  +    Extension = maybe_append_options(
  +        [<<"continuous">>, <<"create_target">>], Props),
       Replicator = {BaseId ++ Extension,
           {gen_server, start_link, [?MODULE, [BaseId, PostBody, UserCtx], []]},
           temporary,
  
positive.code: get_rep_endpoint(UserCtx, <<DbName/binary>>) ->
      {local, DbName, UserCtx}.
  
  open_replication_log(#http_db{}=Db, RepId) ->
      DocId = ?LOCAL_DOC_PREFIX ++ RepId,
      Req = Db#http_db{resource=couch_util:url_encode(DocId)},
      case couch_rep_httpc:request(Req) of
      {[{<<"error">>, _}, {<<"reason">>, _}]} ->
          ?LOG_DEBUG("didn't find a replication log for ~s", [Db#http_db.url]),
          #doc{id=?l2b(DocId)};
      Doc ->
          ?LOG_DEBUG("found a replication log for ~s", [Db#http_db.url]),
          couch_doc:from_json_obj(Doc)
      end;
  open_replication_log(Db, RepId) ->
      DocId = ?l2b(?LOCAL_DOC_PREFIX ++ RepId),
      case couch_db:open_doc(Db, DocId, []) of
      {ok, Doc} ->
          ?LOG_DEBUG("found a replication log for ~s", [Db#db.name]),
          Doc;
      _ ->
          ?LOG_DEBUG("didn't find a replication log for ~s", [Db#db.name]),
          #doc{id=DocId}
      end.
  
  open_db(Props, UserCtx) ->
  
negative.code: 
  -include("couch_db.hrl").
  
  -define(REP_ID_VERSION, 2).
  
  -record(state, {
      changes_feed,
      missing_revs,
  