anchor.diff:              couch_doc:validate_docid(DocId),
               #doc{id=DocId};
           Rev ->
  -            case ?COUCH:open_revs(Db, DocId, [Rev], []) of
  +            case fabric:open_revs(Db, DocId, [Rev], []) of
               {ok, [{ok, Doc0}]}  -> Doc0;
               {ok, [Error]}       -> throw(Error)
               end
  
positive.code:     NewDoc = Doc#doc{
          atts = UpdatedAtts ++ OldAtts2
      },
      {ok, NewRev} = ?COUCH:update_doc(Db, NewDoc, []),
  
      send_json(Req, 201, [{"Etag", "\"" ++ ?b2l(couch_doc:rev_to_str(NewRev)) ++ "\""}], {[
          {ok, true},
  
negative.code:     % open old doc
      Doc = couch_doc_open(Db, SourceDocId, SourceRev, []),
      % save new doc
      {ok, NewTargetRev} = fabric:update_doc(Db,
          Doc#doc{id=TargetDocId, revs=TargetRevs}, []),
      % respond
      send_json(Req, 201,
  