How do I get the intended post type of a revision post?

Post revisions have the original post as their parent, so you can get the post type by checking the post type of the revision’s parent:

$revision  = wp_get_post_revision( $id );
$post_type = get_post_type( $revision->post_parent );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)