anchor.diff:      {DocInfo, _Path} = to_doc_info_path(FullDocInfo),
       DocInfo.
   
  -max_seq(Tree) ->
  +max_seq(Tree, UpdateSeq) ->
       FoldFun = fun({_Pos, _Key}, Value, _Type, MaxOldSeq) ->
           case Value of
               {_Deleted, _DiskPos, OldTreeSeq} ->
  
positive.code:         end, RevInfosAndPath),
      [{_RevInfo, WinPath}|_] = SortedRevInfosAndPath,
      RevInfos = [RevInfo || {RevInfo, _Path} <- SortedRevInfosAndPath],
      {#doc_info{id=Id, high_seq=max_seq(Tree), revs=RevInfos}, WinPath}.
  
  
  
  
negative.code:                 MaxOldSeq
          end
      end,
      couch_key_tree:fold(FoldFun, UpdateSeq, Tree).
  
  to_doc_info_path(#full_doc_info{id=Id,rev_tree=Tree,update_seq=Seq}) ->
      RevInfosAndPath = [
          {#rev_info{
              deleted = element(1, LeafVal),
  