(Legacy Mercurial) problem reopening old branches
In case a named branch has been closed long ago, it is possible that GitLab holds no references to what its head was before the closing changeset. In that case, pushing a new child of the former head can fail during the conversion to the internal Git repository with a bad Git object message.
This happened to me with the heptapod-0-23
branch of this very project: the former head was da810f85b7e1 and had exactly one child, the closing changeset f89d0daa76b0. The fact that da810f85b7e1 is a tagging changeset does not imply that it has itself a GitLab reference).
The root cause is likely that the Git commit converted from this former head has been garbage collected. A solution could be to add closing changesets (and tagging changesets) to the "keep around" special references, but it's dubious that it would be worth the effort, and that wouldn't restore the missing Git commits (they would need to be reexported, which is a bit painful).
At this point in the development of Heptapod, the simplest solution is to migrate the project to native Mercurial, which I just did for heptapod/heptapod>. Afterwards, I was able to push the reopening (with the --force
modifier because of the client-side protection against multiple heads). This confirms that native projects are not affected.
The migration to native is still deemed to be experimental, though. Hopefully, it will become more mainstream soon.