Skip to content
Snippets Groups Projects
Commit bd3911e6 authored by Georges Racinet's avatar Georges Racinet
Browse files

MercurialRepository.Push: prevent auto-publication and GitLab sync

The GitLab sync would need to get user information to ask for
permission (pre-receive hook) and to send resulting information
(post-receive hook). This would require changing a bunch of internal
APIs in the Rails application for the `hg-push` mirror update use case
(currently the only one).

Furthermore, the post-receive hook would in turn
trigger an update of the `hg-push` remote mirror, resulting in effect in an
infinite loop of pushes (we've witnessed the state maintainer `pretxnclose`
Mercurial hook running even if no auto publication occurred).

This can be improved later on, but for now, we'll make the push
effectively read-only by disabling auto publication, and that
allows us to unplug the GitLab state maintainer (`heptapod_sync`).

Users of `hg-push` mirrors will see an explicit message in the
mirror settings page in the case where the push would have been
publishing. Chances are that publication by the mirrorring would
have been very unwelcome anyway (note also that in its first
incarnation, the Rails app won't expose the `include_drafts` boolean).
parent 2dc73858
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment