anchor.diff:      couch_replicator_notifier:notify({error, RepId, <<"cancelled">>}),
       terminate_cleanup(State);
   
  -terminate(Reason, State) ->
  +terminate(Reason, #rep_state{} = State) ->
       #rep_state{
           source_name = Source,
           target_name = Target,
  
positive.code:     true ->
          twig:log(error,"Worker ~p died with reason: ~p", [Pid, Reason]),
          {stop, {worker_died, Pid, Reason}, State2}
      end.
  
  
  handle_call(get_details, _From, #rep_state{rep_details = Rep} = State) ->
      {reply, {ok, Rep}, State};
  
negative.code:     end.
  
  init(InitArgs) ->
      {ok, InitArgs, 0}.
  
  do_init(#rep{options = Options, id = {BaseId, Ext}} = Rep) ->
      process_flag(trap_exit, true),
  