anchor.diff:  -export([start_link/0,
            update_doc/1,
            find_all_replication_docs/0,
  -         delete_replicator_doc/1]).
  +         delete_replicator_doc/1,
  +         get_full_replicator_doc/1]).
   
   -export([init/1, handle_call/3, handle_cast/2,
            handle_info/2, terminate/2, code_change/3]).
  
positive.code:             ok = update_doc(NewDoc),
              {ok, Doc}
      end.
  
negative.code:     end;
  handle_call({foreach_doc, Fun}, _From, #state{local_docs = Docs} = State) ->
      Res = [{Id, (catch Fun(Doc))} || #doc{id = Id} = Doc <- Docs],
      {reply, Res, State};
  handle_call({get_full_replicator_doc, Id}, _From, #state{local_docs = Docs} = State) ->
      R = case lists:keyfind(Id, #doc.id, Docs) of
              false ->
                  not_found;
              Doc0 ->
                  Doc = couch_doc:with_ejson_body(Doc0),
                  {ok, Doc}
          end,
      {reply, R, State}.
  
  replicate_change(#state{remote_nodes=Nodes}, Doc) ->
      [replicate_change_to_node(Node, Doc) || Node <- Nodes],
  