Commit 04eeccba authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-05-16

# Conflicts:
#	app/views/layouts/nav/sidebar/_project.html.haml
#	locale/gitlab.pot

[ci skip]
parents e1158697 51df79f8
...@@ -28,11 +28,6 @@ ...@@ -28,11 +28,6 @@
isOpen: false, isOpen: false,
}; };
}, },
computed: {
clipboardText() {
return `docker pull ${this.repo.location}`;
},
},
methods: { methods: {
...mapActions([ ...mapActions([
'fetchRepos', 'fetchRepos',
...@@ -84,7 +79,7 @@ ...@@ -84,7 +79,7 @@
<clipboard-button <clipboard-button
v-if="repo.location" v-if="repo.location"
:text="clipboardText" :text="repo.location"
:title="repo.location" :title="repo.location"
css-class="btn-default btn-transparent btn-clipboard" css-class="btn-default btn-transparent btn-clipboard"
/> />
......
...@@ -56,10 +56,6 @@ ...@@ -56,10 +56,6 @@
.catch(() => this.showError(errorMessagesTypes.FETCH_REGISTRY)); .catch(() => this.showError(errorMessagesTypes.FETCH_REGISTRY));
}, },
clipboardText(text) {
return `docker pull ${text}`;
},
showError(message) { showError(message) {
Flash(errorMessages[message]); Flash(errorMessages[message]);
}, },
...@@ -89,7 +85,7 @@ ...@@ -89,7 +85,7 @@
<clipboard-button <clipboard-button
v-if="item.location" v-if="item.location"
:title="item.location" :title="item.location"
:text="clipboardText(item.location)" :text="item.location"
css-class="btn-default btn-transparent btn-clipboard" css-class="btn-default btn-transparent btn-clipboard"
/> />
</td> </td>
......
...@@ -79,11 +79,14 @@ ...@@ -79,11 +79,14 @@
= nav_link(path: 'graphs#charts') do = nav_link(path: 'graphs#charts') do
= link_to charts_project_graph_path(@project, current_ref) do = link_to charts_project_graph_path(@project, current_ref) do
= _('Charts') = _('Charts')
<<<<<<< HEAD
- if @project.feature_available?(:file_locks) - if @project.feature_available?(:file_locks)
= nav_link(controller: [:path_locks]) do = nav_link(controller: [:path_locks]) do
= link_to project_path_locks_path(@project) do = link_to project_path_locks_path(@project) do
#{ _('Locked Files') } #{ _('Locked Files') }
=======
>>>>>>> upstream/master
- if project_nav_tab? :issues - if project_nav_tab? :issues
= nav_link(controller: @project.issues_enabled? ? [:issues, :labels, :milestones, :boards] : :issues) do = nav_link(controller: @project.issues_enabled? ? [:issues, :labels, :milestones, :boards] : :issues) do
...@@ -118,11 +121,14 @@ ...@@ -118,11 +121,14 @@
= link_to project_labels_path(@project), title: 'Labels' do = link_to project_labels_path(@project), title: 'Labels' do
%span %span
= _('Labels') = _('Labels')
<<<<<<< HEAD
- if EE::Gitlab::ServiceDesk.enabled?(project: @project) - if EE::Gitlab::ServiceDesk.enabled?(project: @project)
= nav_link(controller: :issues, action: :service_desk ) do = nav_link(controller: :issues, action: :service_desk ) do
= link_to service_desk_project_issues_path(@project), title: 'Service Desk' do = link_to service_desk_project_issues_path(@project), title: 'Service Desk' do
%span Service Desk %span Service Desk
=======
>>>>>>> upstream/master
= nav_link(controller: :milestones) do = nav_link(controller: :milestones) do
= link_to project_milestones_path(@project), title: 'Milestones' do = link_to project_milestones_path(@project), title: 'Milestones' do
...@@ -334,8 +340,11 @@ ...@@ -334,8 +340,11 @@
= link_to project_pages_path(@project), title: 'Pages' do = link_to project_pages_path(@project), title: 'Pages' do
%span %span
= _('Pages') = _('Pages')
<<<<<<< HEAD
= render 'projects/settings/ee/nav' = render 'projects/settings/ee/nav'
=======
>>>>>>> upstream/master
- else - else
= nav_link(controller: :project_members) do = nav_link(controller: :project_members) do
......
---
title: Remove docker pull prefix from registry clipboard feature
merge_request: 18933
author: Lars Greiss
type: changed
---
title: Adding branches through the WebUI is handled by Gitaly
merge_request:
author:
type: other
...@@ -776,13 +776,9 @@ module Gitlab ...@@ -776,13 +776,9 @@ module Gitlab
end end
def add_branch(branch_name, user:, target:) def add_branch(branch_name, user:, target:)
gitaly_migrate(:operation_user_create_branch, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| gitaly_operation_client.user_create_branch(branch_name, user, target)
if is_enabled rescue GRPC::FailedPrecondition => ex
gitaly_add_branch(branch_name, user, target) raise InvalidRef, ex
else
rugged_add_branch(branch_name, user, target)
end
end
end end
def add_tag(tag_name, user:, target:, message: nil) def add_tag(tag_name, user:, target:, message: nil)
...@@ -2211,22 +2207,6 @@ module Gitlab ...@@ -2211,22 +2207,6 @@ module Gitlab
end end
end end
def gitaly_add_branch(branch_name, user, target)
gitaly_operation_client.user_create_branch(branch_name, user, target)
rescue GRPC::FailedPrecondition => ex
raise InvalidRef, ex
end
def rugged_add_branch(branch_name, user, target)
target_object = Ref.dereference_object(lookup(target))
raise InvalidRef.new("target not found: #{target}") unless target_object
OperationService.new(user, self).add_branch(branch_name, target_object.oid)
find_branch(branch_name)
rescue Rugged::ReferenceError => ex
raise InvalidRef, ex
end
def rugged_cherry_pick(user:, commit:, branch_name:, message:, start_branch_name:, start_repository:) def rugged_cherry_pick(user:, commit:, branch_name:, message:, start_branch_name:, start_repository:)
OperationService.new(user, self).with_branch( OperationService.new(user, self).with_branch(
branch_name, branch_name,
......
...@@ -8,8 +8,13 @@ msgid "" ...@@ -8,8 +8,13 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gitlab 1.0.0\n" "Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
<<<<<<< HEAD
"POT-Creation-Date: 2018-05-15 15:07+0200\n" "POT-Creation-Date: 2018-05-15 15:07+0200\n"
"PO-Revision-Date: 2018-05-15 15:07+0200\n" "PO-Revision-Date: 2018-05-15 15:07+0200\n"
=======
"POT-Creation-Date: 2018-05-15 15:05+0200\n"
"PO-Revision-Date: 2018-05-15 15:05+0200\n"
>>>>>>> upstream/master
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
...@@ -76,11 +81,14 @@ msgid_plural "%d unstaged changes" ...@@ -76,11 +81,14 @@ msgid_plural "%d unstaged changes"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
<<<<<<< HEAD
msgid "%d vulnerability" msgid "%d vulnerability"
msgid_plural "%d vulnerabilities" msgid_plural "%d vulnerabilities"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
=======
>>>>>>> upstream/master
msgid "%s additional commit has been omitted to prevent performance issues." msgid "%s additional commit has been omitted to prevent performance issues."
msgid_plural "%s additional commits have been omitted to prevent performance issues." msgid_plural "%s additional commits have been omitted to prevent performance issues."
msgstr[0] "" msgstr[0] ""
...@@ -132,11 +140,14 @@ msgstr "" ...@@ -132,11 +140,14 @@ msgstr ""
msgid "%{title} changes" msgid "%{title} changes"
msgstr "" msgstr ""
<<<<<<< HEAD
msgid "%{type} detected %d vulnerability" msgid "%{type} detected %d vulnerability"
msgid_plural "%{type} detected %d vulnerabilities" msgid_plural "%{type} detected %d vulnerabilities"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
=======
>>>>>>> upstream/master
msgid "%{unstaged} unstaged and %{staged} staged changes" msgid "%{unstaged} unstaged and %{staged} staged changes"
msgstr "" msgstr ""
...@@ -381,6 +392,7 @@ msgstr "" ...@@ -381,6 +392,7 @@ msgstr ""
msgid "An error occurred when toggling the notification subscription" msgid "An error occurred when toggling the notification subscription"
msgstr "" msgstr ""
<<<<<<< HEAD
msgid "An error occurred when updating the issue weight" msgid "An error occurred when updating the issue weight"
msgstr "" msgstr ""
...@@ -390,6 +402,8 @@ msgstr "" ...@@ -390,6 +402,8 @@ msgstr ""
msgid "An error occurred while detecting host keys" msgid "An error occurred while detecting host keys"
msgstr "" msgstr ""
=======
>>>>>>> upstream/master
msgid "An error occurred while dismissing the alert. Refresh the page and try again." msgid "An error occurred while dismissing the alert. Refresh the page and try again."
msgstr "" msgstr ""
...@@ -1599,7 +1613,11 @@ msgstr "" ...@@ -1599,7 +1613,11 @@ msgstr ""
msgid "Configure limits for web and API requests." msgid "Configure limits for web and API requests."
msgstr "" msgstr ""
<<<<<<< HEAD
msgid "Configure push and pull mirrors." msgid "Configure push and pull mirrors."
=======
msgid "Configure push mirrors."
>>>>>>> upstream/master
msgstr "" msgstr ""
msgid "Configure storage path and circuit breaker settings." msgid "Configure storage path and circuit breaker settings."
...@@ -1797,9 +1815,12 @@ msgstr "" ...@@ -1797,9 +1815,12 @@ msgstr ""
msgid "Created" msgid "Created"
msgstr "" msgstr ""
<<<<<<< HEAD
msgid "Creating epic" msgid "Creating epic"
msgstr "" msgstr ""
=======
>>>>>>> upstream/master
msgid "Cron Timezone" msgid "Cron Timezone"
msgstr "" msgstr ""
...@@ -2102,12 +2123,15 @@ msgstr "" ...@@ -2102,12 +2123,15 @@ msgstr ""
msgid "Edit files in the editor and commit changes here" msgid "Edit files in the editor and commit changes here"
msgstr "" msgstr ""
<<<<<<< HEAD
msgid "Elasticsearch" msgid "Elasticsearch"
msgstr "" msgstr ""
msgid "Elasticsearch intergration. Elasticsearch AWS IAM." msgid "Elasticsearch intergration. Elasticsearch AWS IAM."
msgstr "" msgstr ""
=======
>>>>>>> upstream/master
msgid "Email" msgid "Email"
msgstr "" msgstr ""
...@@ -2153,9 +2177,12 @@ msgstr "" ...@@ -2153,9 +2177,12 @@ msgstr ""
msgid "Enable the Performance Bar for a given group." msgid "Enable the Performance Bar for a given group."
msgstr "" msgstr ""
<<<<<<< HEAD
msgid "Enabled" msgid "Enabled"
msgstr "" msgstr ""
=======
>>>>>>> upstream/master
msgid "Environments" msgid "Environments"
msgstr "" msgstr ""
...@@ -2820,6 +2847,7 @@ msgstr "" ...@@ -2820,6 +2847,7 @@ msgstr ""
msgid "IDE|Review" msgid "IDE|Review"
msgstr "" msgstr ""
<<<<<<< HEAD
msgid "Identity provider single sign on URL" msgid "Identity provider single sign on URL"
msgstr "" msgstr ""
...@@ -2829,6 +2857,8 @@ msgstr "" ...@@ -2829,6 +2857,8 @@ msgstr ""
msgid "If using GitHub, you’ll see pipeline statuses on GitHub for your commits and pull requests. %{more_info_link}" msgid "If using GitHub, you’ll see pipeline statuses on GitHub for your commits and pull requests. %{more_info_link}"
msgstr "" msgstr ""
=======
>>>>>>> upstream/master
msgid "If you already have files you can push them using the %{link_to_cli} below." msgid "If you already have files you can push them using the %{link_to_cli} below."
msgstr "" msgstr ""
...@@ -3055,9 +3085,12 @@ msgstr "" ...@@ -3055,9 +3085,12 @@ msgstr ""
msgid "Leave project" msgid "Leave project"
msgstr "" msgstr ""
<<<<<<< HEAD
msgid "License" msgid "License"
msgstr "" msgstr ""
=======
>>>>>>> upstream/master
msgid "List" msgid "List"
msgstr "" msgstr ""
...@@ -3942,6 +3975,7 @@ msgstr "" ...@@ -3942,6 +3975,7 @@ msgstr ""
msgid "ProjectLifecycle|Stage" msgid "ProjectLifecycle|Stage"
msgstr "" msgstr ""
<<<<<<< HEAD
msgid "ProjectSettings|Contact an admin to change this setting." msgid "ProjectSettings|Contact an admin to change this setting."
msgstr "" msgstr ""
...@@ -3966,6 +4000,8 @@ msgstr "" ...@@ -3966,6 +4000,8 @@ msgstr ""
msgid "ProjectSettings|Users can only push commits to this repository that were committed with one of their own verified emails." msgid "ProjectSettings|Users can only push commits to this repository that were committed with one of their own verified emails."
msgstr "" msgstr ""
=======
>>>>>>> upstream/master
msgid "Projects" msgid "Projects"
msgstr "" msgstr ""
...@@ -5404,9 +5440,12 @@ msgstr "" ...@@ -5404,9 +5440,12 @@ msgstr ""
msgid "Verified" msgid "Verified"
msgstr "" msgstr ""
<<<<<<< HEAD
msgid "View epics list" msgid "View epics list"
msgstr "" msgstr ""
=======
>>>>>>> upstream/master
msgid "View file @ " msgid "View file @ "
msgstr "" msgstr ""
......
...@@ -990,65 +990,25 @@ describe Repository do ...@@ -990,65 +990,25 @@ describe Repository do
subject { repository.add_branch(user, branch_name, target) } subject { repository.add_branch(user, branch_name, target) }
context 'with Gitaly enabled' do it "calls Gitaly's OperationService" do
it "calls Gitaly's OperationService" do expect_any_instance_of(Gitlab::GitalyClient::OperationService)
expect_any_instance_of(Gitlab::GitalyClient::OperationService) .to receive(:user_create_branch).with(branch_name, user, target)
.to receive(:user_create_branch).with(branch_name, user, target) .and_return(nil)
.and_return(nil)
subject
end
it 'creates_the_branch' do
expect(subject.name).to eq(branch_name)
expect(repository.find_branch(branch_name)).not_to be_nil
end
context 'with a non-existing target' do
let(:target) { 'fake-target' }
it "returns false and doesn't create the branch" do subject
expect(subject).to be(false)
expect(repository.find_branch(branch_name)).to be_nil
end
end
end end
context 'with Gitaly disabled', :disable_gitaly do it 'creates_the_branch' do
context 'when pre hooks were successful' do expect(subject.name).to eq(branch_name)
it 'runs without errors' do expect(repository.find_branch(branch_name)).not_to be_nil
hook = double(trigger: [true, nil]) end
expect(Gitlab::Git::Hook).to receive(:new).exactly(3).times.and_return(hook)
expect { subject }.not_to raise_error
end
it 'creates the branch' do
allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([true, nil])
expect(subject.name).to eq(branch_name)
end
it 'calls the after_create_branch hook' do
expect(repository).to receive(:after_create_branch)
subject
end
end
context 'when pre hooks failed' do
it 'gets an error' do
allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([false, ''])
expect { subject }.to raise_error(Gitlab::Git::HooksService::PreReceiveError)
end
it 'does not create the branch' do context 'with a non-existing target' do
allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([false, '']) let(:target) { 'fake-target' }
expect { subject }.to raise_error(Gitlab::Git::HooksService::PreReceiveError) it "returns false and doesn't create the branch" do
expect(repository.find_branch(branch_name)).to be_nil expect(subject).to be(false)
end expect(repository.find_branch(branch_name)).to be_nil
end end
end end
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