The code bit used to determine the bitmask for rev_delete when querying contributions is duplicated in three different API modules: ApiQueryAllRevisions, ApiQueryRevisions, and ApiQueryUserContribs.
Hence, it should be factored out of the API and moved somewhere else, probably somewhere in the Revision namespace as a static method.