How to commit to the Asset Server from (Editor) Script?

I want to implement a pretested commit scheme with as much automation as possible. So, is it possible to either commit from an editor script or hook into the commit function (pre-commit) that is invoked from the asset server editor window? I want to be able to run some unit tests before the commit happens. A workaround using external version controll is not desirable as the graphics department is not very tech savvy and will hardly work with something other than the built in asset server.

Seems there is now way to do that. One possibility is to ignore the Asset Server option from the Windows menu and add a seperate option like “pre-tested commit” and run pre-commit tests. According to the result either the Asset Server menu item is invoked ( EditorApplication.ExecuteMenuItem ) or an error message is displayed.

Pre-testet commits increase the efficiency of agile distributed development, so it’s highly recommended to employ it on every project that is worked on in a distributed fashion.