Read about our upcoming Code of Conduct on this issue

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

Repository Model: apply Rubocop rules

More stuff dating back to pre-HDK times (no Rubocop in editor)

--HG--
branch : heptapod-stable
parent 9f176b840e4e
......@@ -878,7 +878,8 @@ def multi_action(user, **options)
if repo_type == Gitlab::GlRepository::PROJECT && project.mercurial?
# not that :branch_name is required at lower level anyway
hg_branch, topic = Gitlab::Mercurial.parse_gitlab_branch_for_hg(
options[:branch_name])
options[:branch_name])
if topic.nil? && raw.hg_config_item_bool?('experimental.topic.publish-bare-branch')
access = ::Gitlab::UserAccess.new(user, container: project)
raise ::Gitlab::HgAccess::ForbiddenError, "This action would create a public changeset on Mercurial branch '#{hg_branch}' which current user is not authorized to do" unless access.hg_can_publish?
......@@ -1268,14 +1269,16 @@ def repository_event(event, tags = {})
end
def initialize_raw_repository
repo = Gitlab::VCS::repository_class(container.vcs_type).new(
repo = Gitlab::VCS.repository_class(container.vcs_type).new(
shard,
disk_path + '.git',
repo_type.identifier_for_container(container),
container.full_path)
if mercurial? && repo_type == Gitlab::GlRepository::PROJECT
repo.hg_project_for_perms = project
end
repo
end
end
......
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