Description
EditRevisionsAjaxAction.execute() adds entries to cru_revision table and then EditRevisionsAjaxAction.addRemoveRepoRev() calls the DefaultContentManager to properly add the revisions to the database, which then executes in a separate thread.
This deadlocks because EditRevisionsAjaxAction.execute() does not commit before calling addRemoveRepoRev, and the work it does executes in a different thread and by extension a different database session.
This is trivially reproducible using MySQL and a LightSCM Subversion repository. This behaviour can not be seen when using the HSQL database
I haven't understood this code well enough to know whether or not it can happen with native repository access as well, but I haven't been able to reproduce it out side of LightSCM.