[PATCH] Fix "created new head" being shown incorrectly

Benoit Boissinot bboissin at gmail.com
Sat Jun 5 17:20:50 CDT 2010


On Sat, Jun 05, 2010 at 11:53:47PM +0200, Gilles Moris wrote:
[snip]
> 
> I would prefer my implementation because it's consistent between branch root 
> and topological root. On the other hand, my implementation introduces a 
> difference for additional branch roots, from the current HG tip (see below).
> 
> I will try to summarize the different cases:
> Par: 1st column for the 2 parents with ...
> N: null or no parent
> B: parent is on another named branch
> C: parent is a regular non head changeset
> H: parent was a branch head of the current branch
> Gil, Raf, Cur(crew tip): whether we print "created new head" message
> In the following, I assume that there *already exists some initial branch 
> heads* of the current branch, otherwise nothing is printed anyway.
> Disclaimer: I have not tested all cases, just reviewed the code.
> 
> Par Gil Raf Cur Comment
> NN   y   y   y  additional topo root
> 
> BN   y   n   n  additional branch root: differs !
> CN   y   y   y  additional topo head
> HN   n   n   n  usual case
> 
> BB   y   n   n  weird additional branch root: differs !
> CB   y   y   y  branch merge
> HB   n   n   n  merge with named branch
> 
> CC   y   y   y  additional head from merge
> CH   n   n   y  Your complaint case: merge with a head
> 
> HH   n   n   n  head merge: head count decreases (*)
> 
> Hope it makes sense and this covers all cases this time.
> What would be the wanted behavior ?

Thanks for this very helpful summary. I think Gil is the wanted
behaviour.

It would be really really nice to have a test for all this cases (so we
can make sure your review matches the code).

Cheers,

Benoit

-- 
:wq


More information about the Mercurial-devel mailing list