[PATCH] Make fast forward merges more like normal merges.

Matt Mackall mpm at selenic.com
Wed Jun 6 21:47:51 CDT 2007


On Wed, Jun 06, 2007 at 10:38:52PM -0300, Alexis S. L. Carvalho wrote:
> Thus spake Eric M. Hopper:
> > On Wed, 2007-06-06 at 17:46 -0700, Brendan Cully wrote:
> > > On Wednesday, 06 June 2007 at 19:44, Nathan Jones wrote:
> > > > I have been using named branches and fast forward merges lately, but I
> Because we store the branch name in the changeset itself, you /have/ to
> add another commit on top of "b".  Right now the only parent of this new
> commit is "b" (since there's no actual need to merge):
> 
>         a               c
> D---D---D               D
>          \          b  /
>           --I---I---I--
> 
> But even though we say that "this is a merge; don't forget to commit",
> it's not /really/ a merge, because the new revision has only 1 parent.
> The patch is essentially suggesting we do a real merge:
> 
>         a               c
> D---D---D---------------D
>          \          b  /
>           --I---I---I--
> 
> Personal opinion: since we have to add a new revision anyway, I think we
> might as well make it a real merge.

On the other hand, it's not strictly correct that 'a' is a direct
ancestor of 'c'. About the only place this matters is the ancestor
algorithm used in merge. It tries to find the most recent ancestor by
measuring distance from root, and this approach puts 'c' three steps
closer to root than it would be otherwise.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial-devel mailing list