Skip to content

Mercurial native mode: notifying GitLab with Mercurial SHAs

Georges Racinet requested to merge topic/default/native-mode into branch/default

This is the first part of heptapod#364 (closed)

If the new heptapod.native config flag is set, payloads of GitLab hooks will be made of Mercurial SHAs instead of Git SHAs.

This will be used for native Mercurial projects, for which obviously GitLab notification hooks must contain Mercurial SHAs, since these are the only ones the Rails app is supposed to be aware of.

For now, there's no facility to set this flag automatically but it can be used for testing in developer setups (by putting it in hdk.hgrc).

Implementation details:

Instead of going over all the places were a SHA is recorded that will end up in a hook call, we convert back to Mercurial right before we send the hook. This is perhaps good enough, while we are in the transitional way of operation of still converting to Git. Things will be very different anyway when we don't do that any more.

Merge request reports

Loading