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, pitrou
Date 2012-09-11.16:02:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347379338.09.0.654301815493.issue15917@psf.upfronthosting.co.za>
In-reply-to
Content
> I might be wrong, but the logic in your hook looks a bit complicated.

This might be true.  The logic I followed is that once a cset is merged, it becomes a parent of another cset (either in the same branch or in the "next" one).  So, if the cset is in 3.x and is not a parent, it should be merged.

> 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?

If it's not a parent, it also means that it doesn't have any child, so we are looking at the same thing from two different points of view.

If I'm reading the code you linked correctly, it's adding all the incoming changesets in a set, and for each changeset added to the set, all its parent are removed, so that eventually only the childless changesets (the topological heads) are left.  This should also be equivalent to "set(allcsets) - set(allparents)".

On the other hand my code checks for specific branches, so if you commit on 3.1 and merge on default, the cset in 3.1 is not a topological head so it's not detected by the version you linked, whereas my script will complain saying that it should be merged with 3.2 and then with default (even if maybe it should complain because you merged it in the wrong branch).
History
Date User Action Args
2012-09-11 16:02:18ezio.melottisetrecipients: + ezio.melotti, loewis, georg.brandl, jcea, pitrou, christian.heimes, eric.araujo
2012-09-11 16:02:18ezio.melottisetmessageid: <1347379338.09.0.654301815493.issue15917@psf.upfronthosting.co.za>
2012-09-11 16:02:17ezio.melottilinkissue15917 messages
2012-09-11 16:02:17ezio.melotticreate