Commit b4f9df3b authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

HgGitRepository#hg_pull: force_system_user flag

This just reuses the previously introduced flag with the
same name in `hg_env_for_write`

--HG--
branch : heptapod
parent f83a51257d2e
Pipeline #12297 skipped with stages
......@@ -508,10 +508,14 @@ def hg_commit(path, username, message, env, add_remove = false)
# If `[]`, nothing will happen
# `env` - optionally allows to reuse a precomputed Hash of environment
# variables.
def hg_pull(user, remote_url, gitlab_branches: nil, env: nil)
# `force_system_user` - can be set to true to perform with full Mercurial
# permissions and allow `user` to be `nil`.
# Ignored if `env` is not `nil`
def hg_pull(user, remote_url, gitlab_branches: nil, env: nil,
force_system_user: false)
return if gitlab_branches&.empty?
env = hg_env_for_write(user) if env.nil?
env = hg_env_for_write(user, force_system_user: force_system_user) if env.nil?
cmd = [Gitlab.config.mercurial.bin_path, 'pull',
remote_url]
unless gitlab_branches.nil?
......
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