Reputation: 46613
Today I lost about 6 hours of work because I did 'hg rollback' instead of 'hg revert'. I won't waste time talking about how dumb it is to have a destructive command that has no confirmation or warning.
I'd prefer to make it so that I can't make a simple mistake like that again. Is there a way I can disable this command from the command line?
Upvotes: 2
Views: 111
Reputation: 5622
You can clobber it with an alias. Try adding the following to your ~/.hgrc
:
[alias]
rollback = !echo WAT?
Note that it may not work properly with old mercurial versions (I would say, older than 1.8).
Upvotes: 9