anchor.diff:  rev_to_str(Rev) ->
       Rev.
   
  +write_fun() ->
  +    fun(Data) ->
  +        receive {get_data, Ref, From} ->
  +            From ! {data, Ref, Data}
  +        end
  +    end.
   
   stream_doc({JsonBytes, Atts, Boundary, Len}) ->
       case erlang:erase({doc_streamer, Boundary}) of
  
positive.code:             ),
              #httpdb{retries = Retries, wait = Wait0} = HttpDb,
              Wait = 2 * erlang:min(Wait0 * 2, ?MAX_WAIT),
              twig:log(notice,"Retrying GET to ~s in ~p seconds due to error ~p",
                  [Url, Wait / 1000, Else]
              ),
              ok = timer:sleep(Wait),
  
negative.code:     _ ->
          ok
      end,
      DocStreamer = spawn_link(
          couch_doc,
          doc_to_multi_part_stream,
          [Boundary, JsonBytes, Atts, write_fun(), true]
      ),
      erlang:put({doc_streamer, Boundary}, DocStreamer),
      {ok, <<>>, {Len, Boundary}};
  stream_doc({0, Id}) ->
  