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

Eric Hopper hopper at omnifarious.org
Thu Jun 7 13:29:08 CDT 2007


On 6/7/07, Peter Baumann <siprbaum at stud.informatik.uni-erlangen.de> wrote:
>
> So without doing a fastfoward merge, you never get to the situation
> where you the HEADs of the repos are identicall, where the SHA1 of HEAD
> commit in repo1 == SHA1 of HEAD commit in repo2, so you are per
> definition (in git) never uptodate. As I said, I have no clue about hg
> and if this would become a problem, but in git, it really _IS_ a problem
> if you don't do fastforward merges.
>
> (This was explained by Linus in a very longish flame^W^Wdiscussion with
> the bzr people on the git ML)


So, essentially a fast-forward merge in git does the equivalent of hg pull,
hg update in the absence of branch tags.  The only reason Mercurial would
need it is when branch tags are being used and you want to 'merge' the
remote branch back into having your local branch tag.

This leads me to another interesting question, what about this case?

A1--A2--A3        A4------A5
         \        /       /
         B1--B2--B3--B4--B5

So, if A4 is a fast-forward merge and there are no changes other than the
branch tag, why shouldn't A5 be as well?  Won't you end up with the same
'artificially close ancestor' problem for A5 that you would've had for A4
and you made A3 one of its parents?

Maybe there is a better way of handling this 'fast-forward' merge idea.
Perhaps a default branch set in the hgrc file so that when you next commit a
change after doing a pull/update of a remote branch which requires no 'real'
merge that it commits in your default branch?  Maybe you should get a
refusal to commit and override the branch tag with a default branch from
your hgrc unless you specify a special option to commit?

Just some thoughts,
-- 
Eric Hopper -- http://www.omnifarious.org/~hopper/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial-devel/attachments/20070607/59a24118/attachment.htm 


More information about the Mercurial-devel mailing list