Merge problems in mercurial because of wrong merge base: what's happening? -
Merge problems in mercurial because of wrong merge base: what's happening? -
i have repository in 2 revisions (14321 , 14319) share parent (14318) - both changesets direct children of 14318. nevertheless, revision set query ancestor(14321, 14319)
not homecoming 14318, instead returns much older changeset. what's happening?
screenshot in tortoisehg:
background: encountered odd merge conflicts turned out caused mercurial trying re-apply changes had been merged. able track downwards odd selection of merge base of operations caused both heads include same changes - don't understand why happened , how can prevent in future (i chose dvcs partly avoid these kinds of problems in first place...)
the image shows there not 1 2 mutual ancestors. so, looks criss-cross merge case merge problems arise chosing 1 or mutual ancestor.
references:
http://bz.selenic.com/show_bug.cgi?id=1327#c18 http://www.gelato.unsw.edu.au/archives/git/0504/2279.html http://wiki.vestasys.org/mergingfuture/food4thought/trickycases http://revctrl.org/crisscrossmerge?action=recall&rev=11 http://bz.selenic.com/show_bug.cgi?id=1327#c18there proposal new merge algorithm (http://mercurial.selenic.com/wiki/consensusmerge). however, since mercurial's 2.3 sprint topic stuck.
to cut down kind of problem, suggest estabilish client-server topology, developers merge official repository. maybe rebase help also.
a criss-cross merge this:
b --- d / \ / \ / \ / \ x f \ / \ / \ / \ / c --- e
in case, was:
b -----------o---- } stable/production c \ \ f ------o------o---\------o } default \ d \ / -----------o--- } feature e = ? b = 14318 c = 14294 d = 14319 e = 14321 f = ?
to produce f
, there 2 possible circuits: b-d-e-f
, c-d-e-f
. mercurial has chosen latter.
you have avoided criss-cross if haven't merged production , feature branches. hotfix have been propagated feature branch via default branch. log be:
b -----------o } stable/production c \ f ------o------o------o } default \ d \ / -------o--- } feature e
mercurial merge ancestor
Comments
Post a Comment