anchor.diff:  deleted_item(true) -> [{deleted,true}];
   deleted_item(_) -> [].
   
  -send_changes(Req, Resp, Db, Dir, StartSeq, Prepend, ResponseType, FilterFun, End) ->
  +send_changes(Req, Resp, Db, Dir, StartSeq, Prepend, ResponseType, Limit, FilterFun, End) ->
       Style = list_to_existing_atom(
               couch_httpd:qs_value(Req, "style", "main_only")),
       IncludeDocs = list_to_existing_atom(
               couch_httpd:qs_value(Req, "include_docs", "false")),
       try
           couch_db:changes_since(Db, Style, StartSeq, fun changes_enumerator/2, 
  -            [{dir, Dir}], {Db, StartSeq, Prepend, FilterFun, Resp, ResponseType, IncludeDocs})
  +            [{dir, Dir}], {Db, StartSeq, Prepend, FilterFun, Resp, ResponseType, Limit, IncludeDocs})
       after
           End()
       end.
  
positive.code:             {rev, Seq};
          _Bad -> throw({bad_request, "descending must be true or false"})
      end,
      ResponseType = couch_httpd:qs_value(Req, "feed", "normal"),
      if ResponseType == "continuous" orelse ResponseType == "longpoll" ->
          {ok, Resp} = start_json_response(Req, 200),
  
negative.code:         updated ->
              {ok, Db2} = couch_db:open(DbName, [{user_ctx, UserCtx}]),
              keep_sending_changes(Req, Resp, Db2, EndSeq, Prepend2, Timeout,
                  TimeoutFun, ResponseType, NewLimit, Filter, End);
          stop ->
              end_sending_changes(Resp, EndSeq, ResponseType)
          end
      end.
  
  changes_enumerator(DocInfos, {Db, _, _, FilterFun, Resp, "continuous", Limit, IncludeDocs}) ->
      [#doc_info{id=Id, high_seq=Seq, revs=[#rev_info{deleted=Del,rev=Rev}|_]}|_] = DocInfos,
      Results0 = [FilterFun(DocInfo) || DocInfo <- DocInfos],
      Results = [Result || Result <- Results0, Result /= null],
      Go = if Limit =< 1 -> stop; true -> ok end,
      case Results of
      [] ->
          {Go, {Db, Seq, nil, FilterFun, Resp, "continuous", Limit, IncludeDocs}};
      _ ->
          send_chunk(Resp, [?JSON_ENCODE(changes_row(Db, Seq, Id, Del, Results, Rev, IncludeDocs))
              |"\n"]),
          {Go, {Db, Seq, nil, FilterFun, Resp, "continuous",  Limit-1, IncludeDocs}}
      end;
  changes_enumerator(DocInfos, {Db, _, Prepend, FilterFun, Resp, _, Limit, IncludeDocs}) ->
      [#doc_info{id=Id, high_seq=Seq, revs=[#rev_info{deleted=Del,rev=Rev}|_]}|_] = DocInfos,
      Results0 = [FilterFun(DocInfo) || DocInfo <- DocInfos],
      Results = [Result || Result <- Results0, Result /= null],
      Go = if Limit =< 1 -> stop; true -> ok end,
      case Results of
      [] ->
          {Go, {Db, Seq, Prepend, FilterFun, Resp, nil, Limit, IncludeDocs}};
      _ ->
          send_chunk(Resp, [Prepend, ?JSON_ENCODE(
              changes_row(Db, Seq, Id, Del, Results, Rev, IncludeDocs))]),
          {Go, {Db, Seq, <<",\n">>, FilterFun, Resp, nil, Limit-1, IncludeDocs}}
      end.
  
  changes_row(Db, Seq, Id, Del, Results, Rev, true) ->
  