jcollum
jcollum

Reputation: 46613

can I disable rollback in Mercurial?

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

Answers (1)

C2H5OH
C2H5OH

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

Related Questions