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).
Loading
Please register or sign in to comment