Why backout, not revert?

Marcin Kasperski Marcin.Kasperski at softax.com.pl
Tue Mar 25 11:18:29 CDT 2008

Alpár Jüttner <alpar at cs.elte.hu> writes:

> On Tue, 2008-03-25 at 10:37 +0100, 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"
>> )
> Backout seems to be equivalent with
>    hg update -C BadCommit
>    hg revert -r ParentOfBadCommit
>    hg commit

To me more-or-less too (IIRC you should add hg merge to complete the

> Personally I think that backout is of little use.

Yeah, I also feel that if it happens that I need to withdraw some
changes, then most ofthen there are a few changesets to be
withdrawn. Maybe because I commit often...

> Hopefully it is used very rarely in practice, 

The main reason I ask this is that I feel that backout is heavily
documented (in Mercurial Book, on the wiki), while revert -r is rarely
mentioned as the way to withdraw changes. And I am curious - why?

| Marcin Kasperski   | You have the right to peace, fun, and
| http://mekk.waw.pl | productive and enjoyable work. (Beck)
|                    |

More information about the Mercurial mailing list