Commits

Patrick Mézard
committed
6c6bb7a2012-06-13

stabilize: improve unstable selection heuristic

Without argument, stabilize was picking the first in:

"unstable() and ((suspended() or obsancestors(::.))::)"

which usually returned the "oldest" unstable revision in parentpredecessors descendants. This revision is interesting because itusually gives "soft" merges but rebasing it left the working directoryon a remote branch, which was very confusing.

The new heuristic picks an unstable changeset which can be rebased ontop of the parent revision, or on top of one of its descendants(selected in revision order). This has the advantage of selecting arevision which can be rebased on the current subtree, and leave theworking directory in a more convenient location.