anchor.diff:              0 -> AccRemoveSeqs;
               _ -> [OldSeq | AccRemoveSeqs]
           end,
  -        merge_rev_trees(MergeConflicts, RestDocsList, RestOldInfo,
  -                [NewInfo|AccNewInfos], RemoveSeqs, AccSeq+1)
  +        merge_rev_trees(Limit, MergeConflicts, RestDocsList, RestOldInfo,
  +            [NewInfo|AccNewInfos], RemoveSeqs, AccSeq+1)
       end.
   
   
  
positive.code:             end
          end,
          OldTree, NewDocs),
      if NewRevTree == OldTree ->
          % nothing changed
          merge_rev_trees(MergeConflicts, RestDocsList, RestOldInfo, AccNewInfos,
                  AccRemoveSeqs, AccSeq);
      true ->
          % we have updated the document, give it a new seq #
          NewInfo = #full_doc_info{id=Id,update_seq=AccSeq+1,rev_tree=NewRevTree},
  
negative.code:     #db{
          fulldocinfo_by_id_btree = DocInfoByIdBTree,
          docinfo_by_seq_btree = DocInfoBySeqBTree,
          update_seq = LastSeq,
          revs_limit = RevsLimit
          } = Db,
      Ids = [Id || [{_Client, #doc{id=Id}}|_] <- DocsList],
      % lookup up the old documents, if they exist.
  