[PATCH 0 of 1] merge: add --no-fast-forward to suppress fast-forward merge
Mads Kiilerich
mads at kiilerich.com
Sun Mar 6 09:26:06 CST 2011
FUJIWARA Katsunori wrote, On 03/06/2011 11:24 AM:
> The behavior of Mercurial on merge between named branches is changed
> to 'fast-forward' style since 1.8 by 9e7e24052745.
Yes. I proposed a bugfix in
http://selenic.com/pipermail/mercurial-devel/2010-December/026695.html
and asked some questions. Matt pushed it for 1.8 without further comments.
The way I tend to see it a merge merges two diverging branches of
development. Merging with an ancestor is by definition not a merge. The
data model and most algorithms allows merging with an ancestor, but it
seems to me like we have an invariant that says that merge changesets
must merge diverged branches of development.
One place where merging with an ancestor causes trouble is when convert
cleans up the converted changesets - see Issue2538.
I can however see how the old behavior can be convenient, mostly because
the current graph visualizations doesn't visualize "changesets on same
branch are related" very clearly. I think that is the main problem, not
that we do fast forward merges across named branches. See Issue2678.
A similar partly enforced invariant seems to be "no empty changesets".
Named branches do however make that possible ... or redefines what empty
means. It seems like some users/developers would like to see a similar
exception for named branches and merging with ancestors.
> BTW, I cannot find out any documentation about introducing of
> fast-forward merge in 1.8 release artifacts. Does this confuse
> existing users ?
It is IMHO not something that is introduced. It is a bugfix. That might
confuse users that rely on the old behavior.
/Mads
More information about the Mercurial-devel
mailing list