Multiple heads and branch/topic changes
Multiple heads on Mercurial branches are handled by giving them temporary Git branches in the wild
namespace.
On subsequent pushes with the --prune
option, these "wild" Git branches are examined individually, and get pruned if the corresponding Mercurial revision is not a head any more, meaning they have children.
Currently, the Git mirror sync hook of Heptapod will perform the regular push and the pruning one for each Mercurial transaction.
But currently, nothing checks if children of those former heads are on the same branch/topic. In other words, we're speaking of heads of the branch in their primary handling and absolute ("topological") heads in the pruning. This is inconsistent and leads to strangeties like this:
Assume we have two heads D1
and D2
on branch default
, and that D2
has a child, O1
, on branch other
. What we'll see after the push of O1
is:
-
wild/hash(D1)
:D1
-
branch/other
:O1
-
branch/default
: stayed where it was beforeD1
andD2
appeared, hence not even set if that's an initial push, as in Heptapod imports
This is very puzzling for users, although there's no data loss: seeing only one of the "wild" heads doesn't help resolving them and makes users think the push or import failed.
This happens with the import of the PyPy repository, the end result being that there's no branch/default
in GitLab UI.