Why backout, not revert?

Masklinn masklinn at masklinn.net
Tue Mar 25 05:48:56 CDT 2008

On 25 Mar 2008, at 10:37 , Marcin Kasperski wrote:

> Are there any noticeable advantages of using backout instead of  
> revert?
> (by using revert I mean
>     hg revert -r BeforeIStartedThisBadIdea
>     hg commit -m "Giving up the flawed concept"
> )

Well I said something stupid again, I your usage of "-r" hadn't made  
it to my brain...

With "-r", I guess it's both a convenience (with revert you have to  
commit, backout creates a changeset for you) and a better history:  
revert + commit just adds the patch to the current tip, but backout  
creates the backout patch as a child of the backed out one, so what  
happened afterwards is much clearer when you check the history with  
e.g. hgk

More information about the Mercurial mailing list