Ezio Melotti added the comment:

> Wouldn't it be simpler to find all topological heads in the new csets
> (a topological head is a cset without any child), and check that none
> of them is on a 3.* branch?

Indeed -- I was looking at this again and it occurred to me that checking that 
the only two topological heads are 2.7 and default would be simpler, which is 
basically the same thing you were suggesting.

I couldn't find a way to get the list of topological heads on active and 
non-closed heads using the `hg *` commands, but it shouldn't be difficult to do 
it from the API.
FWIW, `hg heads --topo` also includes closed heads that have never been merged 
with the other branches (e.g. 2.0, 2.1, etc.).  `hg branches` lists all the 
non-closed branches, and, among them, the one that are not "inactive" should be 
the ones with a topological head.  Therefore this should boil down to either a 
set intersection between open branches and topological heads, or a set 
difference between open branches and inactive branches.

Once the hook detects an extra head, it could try to figure out what's wrong 
and suggest a solution.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15917>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to