It's impossible to give a complete answer, or even a generalizing answer, because ultimately it depends on why the revolution is occurring and the general happiness of the military with the preexisting regime. Is the military well-paid and treated like an upper class? Then you're probably going to see the military try to maintain the status quo. But if the soldiers' interests are threatened - or the interest of the generals that have the respect of the soldiers - then the military will probably join in the revolt.
Let's use the civil wars of the Roman Empire as an example. The various armies of Rome supported their emperor in large part due to their pay; when the existing emperor threatened that, either through incompetence or an unwillingness to, the soldiers would take action, either by assassinating the emperor or declaring their own general emperor and force a civil war.
Ultimately, you have to look at the individual circumstances to determine what the military will do in any given revolution.