About changing the status of the --parent option of the hg backout command from DEPRECATED to WARNING

Nikolaj Sjujskij sterkrig at myopera.com
Sat May 18 05:27:28 CDT 2013

Den 2013-05-18 03:39:47 skrev André Felipe Dias <andref.dias at gmail.com>:

> 2013/5/17 Matt Mackall <mpm at selenic.com>
>>> I don't think the existence of a non-broken use case is essential or
>>> even possible. Simply, there is no alternative sometimes! As in a
>>> wrong merge between an incomplete feature branch and the default
>>> branch. Yes, there will be implications, but they are unavoidable and
>>> inherent to DVCS and not a hg's limitation.
>>> When a situation like this occurs and a user searches for a solution,
>>> the backout command is the best shot but its help says:
>>>     "Note: backout cannot be used to fix either an unwanted or
>>> incorrect merge."
>>> This is misinformation! The backout command can fix it through the
>>> '--parent' option, but there are implications.
>> And the "implications" here are that it doesn't actually fix anything
>> and leaves you with more problems than you started with.
> Still, this problem eventually happens and thus needs a solution. What do
> you recommend?
  I recommend not thinking that `backout --parent` could help in this case.
It's one thing when one devises his own kludgy "solution" (like creating a  
patch with `hg diff` then applying it), and quite the other when one sees  
some magic option and relies on tool developers (they should know better,  
shouldn't they?). Both do essentially the same, both have the same  
implications, but `backout --parent` smells "official", while homebrewn  
solution is more... kind of "transparent", thus exposing those  
implications better.

>> the fact that you think this feature is somehow still useful for fixing
>> merges after having researched it is good evidence of the theory that
>> more information is not necessarily better for usability.
> If this feature isn't useful for fixing merges, what is it then?
> For example, suppose the following situation where a feature-x branch was
> prematurely merged into default by mistake. It is not possible to back  
> out
> just one revision of feature-x branch nor immediatly finish feature-x
> directly in default. How to revert the default branch to a consistent  
> state
> after the fact?
>  ---o---o---o---M   } default
>                /
>    ---o---o---o     } feature-x
  If you know how this situation could be fixed, please tell. Current  
`backout --parent` implementation is considered unacceptable.

More information about the Mercurial-devel mailing list