How to detect if a revision was made by woocommerce or wordpress?

Woocommerce uses the post_type product for products, so it should be easy enough to search for those instead of posts.

Just look out for the proper post_type.

You could filter the revisions using a self-joined select like this:

SELECT *
FROM `wp_posts` p1
LEFT JOIN `wp_posts` p2 ON (p2.post_parent = p1.ID and p1.post_type="products")
WHERE p1.`post_type` = "revision"
LIMIT 50

Still, I wouldn’t convert my revisions into posts nor anything like that. You’ll end up with TONS of garbage posts laying around.