anchor.diff:      ets:update_counter(Stats, docs_read, length(Docs)),
       
       %% save them (maybe in a buffer)
  -    {NewBuffer, NewContext} = case couch_util:should_flush() of
  +    {NewBuffer, NewContext} = 
  +    case should_flush(lists:flatlength([Docs|Buffer])) of
           true ->
               Docs2 = lists:flatten([Docs|Buffer]),
               {ok, Errors} = update_docs(Target, Docs2, [], replicated_changes),
  
positive.code: open_doc_revs(Db, DocId, Revs, Options) ->
      couch_db:open_doc_revs(Db, DocId, Revs, Options).
  
  
  update_doc(#http_db{uri=DbUrl, headers=Headers}, #doc{id=DocId}=Doc, Options) ->
      [] = Options,
  
negative.code: 
  -export([replicate/2]).
  
  -define(BUFFER_NDOCS, 1000).
  -define(BUFFER_NATTACHMENTS, 50).
  -define(BUFFER_MEMORY, 10000000). %% bytes
  
  -include("couch_db.hrl").
  -include("../ibrowse/ibrowse.hrl").
  
  %% @spec replicate(Source::binary(), Target::binary()) -> 
  %%      {ok, Stats} | {error, Reason}
  