Merging with ancestor and DAG well-formedness

Wagner Bruna wagner.bruna+mercurial at gmail.com
Thu Dec 30 10:25:31 CST 2010


On 12/25/2010 10:26 PM, Mads Kiilerich wrote:
> Please share your opinion here or comment on
> http://mercurial.selenic.com/bts/issue2538 .
> 
> Is it an implicit invariant in the Mercurial repository data model that
> a merge always merges changesets that not are each others
> ancestor/descendant? Or is it only something that mostly is enforced at
> the command line API?
> 
> Is it a bug if we somehow ends up with a merge changeset where the
> parents are linearly related?

Since merges between ancestors can happen rather easily in workflows
using named branches (see eg. crew 15b8a652b558 or 3cb0559e44d0), IMHO
the code needs to deal properly with those.

Regards,
Wagner

> Is it thus ok if future operations (such as convert/rebase) on such
> repositories fails? Is it feasible at all to work correctly on such
> repositories - and is it well-defined what correct means?
> 
> Is it a bug in cvs2hg that it creates such changesets (to simulate cvs
> tags)?
> 
> Is the "solution" at the bottom of
> http://hgtip.com/tips/advanced/2010-04-23-debug-command-tricks/ a _very_
> bad tip?
> 
> 
> Or is Oedipus merges something that is convenient and acceptable in some
> cultures and something that the internal API and data model makes
> possible and that thus should be supported everywhere?
> 
> 
> Matt pushed http://www.selenic.com/hg/rev/9e7e24052745 , and I assume
> that he thus implicitly gave some support towards maintaining a
> well-formedness invariant.
> 
> /Mads


More information about the Mercurial-devel mailing list