Can I suggest that the "undo" feature is disabled if the last revision has been pushed?
I've been in the position several times where I have (completely self-induced) been a complete idiot by doing the following actions...
- Commit a change
- Push change to remote server
- Some time later notice something, so "undo" the last change
- Recommit the change
- Push change to remote server to be reminded that I'm an idiot, and that this is going to cause two branch heads.
Blocking the "undo" would (hopefully) stop me being such a complete idiot - at least where this is concerned.