The work of WordPress Function update_post

The supports parameter for the post type has to ask for revisions.

Example:

register_post_type( 
    'portfolio', 
    array( 
        'supports' => array ( 'revisions' ) 
    ) 
);