This instance will be upgraded to Heptapod 0.20.1 on 2020-03-08 at 14:00 UTC+1 (10 minutes of downtime)

Commit 6d97d4f8 authored by Georges Racinet's avatar Georges Racinet 🦑

Rust: new mercurial:module_policy option

Allows to disable the Rust Python extensions in calls performed
from the Rails application

Closes #386

--HG--
branch : heptapod
parent 1e073c5554f4
......@@ -1175,6 +1175,14 @@ production: &base
# (Unix domain socket are not implemented yet)
# hgserve_url: http://127.0.0.1:8000
# Mercurial internal code selection
# Possible values are "c", "rust+c", "pure", "c-allow" and "rust+c-allow"
# The "-allow" variants don't require the corresponding binary to be
# available. The strict ones do.
#
# If not set, the compile-time default is used (usually strict)
# module_policy:
## Webpack settings
# If enabled, this will tell rails to serve frontend assets from the webpack-dev-server running
# on a given port instead of serving directly from /assets/webpack. This is only indended for use
......
......@@ -13,6 +13,11 @@
'/opt/gitlab/etc/docker.hgrc',
'/etc/gitlab/heptapod.hgrc'].freeze
Settings.mercurial['bin_path'] ||= 'hg'
# Ensure module_policy is understood, even if nil (this is required)
# Note that 'module_policy:' in YaML translates as nil. To make an
# empty string one should write 'module_policy: ""', chances for that to happen
# if someone simply wishes to get back to the default are slim.
Settings.mercurial['module_policy'] ||= nil
Gitlab.ee do
Settings.ldap['sync_time'] = 3600 if Settings.ldap['sync_time'].nil?
......
......@@ -381,7 +381,10 @@ def hg_changeset_branch(hgsha)
end
def hg_env_minimal
{ 'HGRCPATH' => Gitlab::Mercurial.hgrc_path }
env = { 'HGRCPATH' => Gitlab::Mercurial.hgrc_path }
hg_mod_pol = Gitlab.config.mercurial.module_policy
env['HGMODULEPOLICY'] = hg_mod_pol unless hg_mod_pol.nil?
env
end
# Return a suitable environment for write operations (merge etc.)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment