It's an interesting scenario because it almost seems to me that Khameni and Ahmadinejad have intended a deliberate provocation of their critics.
Ahmadinejad winning the election wouldn't really come as a huge surprise as he enjoys solid support among the rural areas of the country and the less well off, but the margin of his victory seems incredibly unlikely; it's just hard to see where the extra votes come from to warrant such an increase in support when criticism of him has increased in recent times. There has, then, obviously been some manipulation and some things are patently implausible and suggest fraud - Mousavi, the opposition candidate, failing to win in his own province, the other two candidates receiving fewer votes than there are members of their parties, and reports of turnout in some areas exceeding 100%. The point is that this was unsubtle fraud, so either it's down to incompetence or it was deliberate and meant to draw out the reformers and the critics - typically the young, educated urban types who threatened the established theocracy - so that the government and the old way could crack down on them and assert authority. Some of Ahmadinejad's language seems to back that up as he has been fairly needlessly provocative and contemptuous. It's a new world, Iran is an extremely youthful country and a lot of young people have been exposed to a lot of foreign culture and ideas - Obama in the White House also changes things hugely, of course - and the puritanical brand of Islam that has ruled the country for a long time doesn't know how to deal with this. Perhaps then, they've responded how most panicking authoritarian governments do - a display of force. It's simply that they needed to manufacture an excuse for it.
So, no, I don't think there will be a revolution and I think this is quite possibly fairly well managed if not necessarily actually a wise move. I imagine the protests will dissipate eventually and while there will some permanent damage to the government's authority, it sadly won't be in the arenas that really count.
But that's just how I read the logic of what the powers that be have done there.