This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients christian.heimes, eric.araujo, ezio.melotti, georg.brandl, jcea, loewis, orsenthil, pitrou, r.david.murray, terry.reedy
Date 2013-03-22.16:07:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363968439.43.0.251707813346.issue15917@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2013-03-22 16:07:19ezio.melottisetrecipients: + ezio.melotti, loewis, georg.brandl, terry.reedy, jcea, orsenthil, pitrou, christian.heimes, eric.araujo, r.david.murray
2013-03-22 16:07:19ezio.melottisetmessageid: <1363968439.43.0.251707813346.issue15917@psf.upfronthosting.co.za>
2013-03-22 16:07:19ezio.melottilinkissue15917 messages
2013-03-22 16:07:18ezio.melotticreate