Commit 7f042cf0 authored by Alejandro Rodríguez's avatar Alejandro Rodríguez

Fix conflicts after ce-upstream merge

parent 4ab27ca5
...@@ -62,11 +62,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -62,11 +62,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
format.html { define_discussion_vars } format.html { define_discussion_vars }
format.json do format.json do
<<<<<<< HEAD
render json: MergeRequestSerializer.new.represent(@merge_request, type: :full) render json: MergeRequestSerializer.new.represent(@merge_request, type: :full)
=======
render json: MergeRequestSerializer.new.represent(@merge_request)
>>>>>>> ce/master
end end
format.patch do format.patch do
......
...@@ -197,10 +197,8 @@ class Projects::NotesController < Projects::ApplicationController ...@@ -197,10 +197,8 @@ class Projects::NotesController < Projects::ApplicationController
) )
end end
<<<<<<< HEAD
attrs[:commands_changes] = note.commands_changes unless attrs[:award] attrs[:commands_changes] = note.commands_changes unless attrs[:award]
=======
>>>>>>> ce/master
attrs attrs
end end
......
...@@ -3,24 +3,16 @@ require 'securerandom' ...@@ -3,24 +3,16 @@ require 'securerandom'
require 'forwardable' require 'forwardable'
class Repository class Repository
<<<<<<< HEAD include Gitlab::ShellAdapter
include Elastic::RepositoriesSearch include Elastic::RepositoriesSearch
attr_accessor :path_with_namespace, :project
class CommitError < StandardError; end class CommitError < StandardError; end
MIRROR_REMOTE = "upstream" MIRROR_REMOTE = "upstream"
MIRROR_GEO = "geo" MIRROR_GEO = "geo"
# Files to use as a project avatar in case no avatar was uploaded via the web
# UI.
AVATAR_FILES = %w{logo.png logo.jpg logo.gif}
=======
include Gitlab::ShellAdapter
attr_accessor :path_with_namespace, :project
class CommitError < StandardError; end
# Methods that cache data from the Git repository. # Methods that cache data from the Git repository.
# #
# Each entry in this Array should have a corresponding method with the exact # Each entry in this Array should have a corresponding method with the exact
...@@ -55,7 +47,6 @@ class Repository ...@@ -55,7 +47,6 @@ class Repository
# This only works for methods that do not take any arguments. # This only works for methods that do not take any arguments.
def self.cache_method(name, fallback: nil) def self.cache_method(name, fallback: nil)
original = :"_uncached_#{name}" original = :"_uncached_#{name}"
>>>>>>> ce/master
alias_method(original, name) alias_method(original, name)
...@@ -1297,16 +1288,12 @@ class Repository ...@@ -1297,16 +1288,12 @@ class Repository
end end
end end
<<<<<<< HEAD
def main_language def main_language
return unless head_exists? return unless exists?
Linguist::Repository.new(rugged, rugged.head.target_id).language Linguist::Repository.new(rugged, rugged.head.target_id).language
end end
def avatar
return nil unless exists?
=======
# Caches the supplied block both in a cache and in an instance variable. # Caches the supplied block both in a cache and in an instance variable.
# #
# The cache key and instance variable are named the same way as the value of # The cache key and instance variable are named the same way as the value of
...@@ -1320,7 +1307,6 @@ class Repository ...@@ -1320,7 +1307,6 @@ class Repository
# fallback - A value to fall back to in the event of a Git error. # fallback - A value to fall back to in the event of a Git error.
def cache_method_output(key, fallback: nil, &block) def cache_method_output(key, fallback: nil, &block)
ivar = cache_instance_variable_name(key) ivar = cache_instance_variable_name(key)
>>>>>>> ce/master
if instance_variable_defined?(ivar) if instance_variable_defined?(ivar)
instance_variable_get(ivar) instance_variable_get(ivar)
...@@ -1335,17 +1321,9 @@ class Repository ...@@ -1335,17 +1321,9 @@ class Repository
end end
end end
<<<<<<< HEAD
def head_exists?
exists? && !empty? && !rugged.head_unborn?
end
private
=======
def cache_instance_variable_name(key) def cache_instance_variable_name(key)
:"@#{key.to_s.tr('?!', '')}" :"@#{key.to_s.tr('?!', '')}"
end end
>>>>>>> ce/master
def file_on_head(type) def file_on_head(type)
if head = tree(:head) if head = tree(:head)
...@@ -1355,10 +1333,6 @@ class Repository ...@@ -1355,10 +1333,6 @@ class Repository
end end
end end
<<<<<<< HEAD
def file_on_head(regex)
tree(:head).blobs.find { |file| file.name =~ regex }
=======
private private
def refs_directory_exists? def refs_directory_exists?
...@@ -1369,7 +1343,6 @@ class Repository ...@@ -1369,7 +1343,6 @@ class Repository
def cache def cache
@cache ||= RepositoryCache.new(path_with_namespace, @project.id) @cache ||= RepositoryCache.new(path_with_namespace, @project.id)
>>>>>>> ce/master
end end
def tags_sorted_by_committed_date def tags_sorted_by_committed_date
......
...@@ -13,11 +13,8 @@ class IssuableEntity < Grape::Entity ...@@ -13,11 +13,8 @@ class IssuableEntity < Grape::Entity
expose :created_at expose :created_at
expose :updated_at expose :updated_at
expose :deleted_at expose :deleted_at
<<<<<<< HEAD
expose :time_estimate expose :time_estimate
expose :total_time_spent expose :total_time_spent
expose :human_time_estimate expose :human_time_estimate
expose :human_total_time_spent expose :human_total_time_spent
=======
>>>>>>> ce/master
end end
...@@ -4,10 +4,7 @@ class IssueEntity < IssuableEntity ...@@ -4,10 +4,7 @@ class IssueEntity < IssuableEntity
expose :due_date expose :due_date
expose :moved_to_id expose :moved_to_id
expose :project_id expose :project_id
<<<<<<< HEAD
expose :weight expose :weight
=======
>>>>>>> ce/master
expose :milestone, using: API::Entities::Milestone expose :milestone, using: API::Entities::Milestone
expose :labels, using: LabelEntity expose :labels, using: LabelEntity
end end
class MergeRequestEntity < IssuableEntity class MergeRequestEntity < IssuableEntity
<<<<<<< HEAD
expose :approvals_before_merge expose :approvals_before_merge
=======
>>>>>>> ce/master
expose :in_progress_merge_commit_sha expose :in_progress_merge_commit_sha
expose :locked_at expose :locked_at
expose :merge_commit_sha expose :merge_commit_sha
...@@ -11,11 +8,8 @@ class MergeRequestEntity < IssuableEntity ...@@ -11,11 +8,8 @@ class MergeRequestEntity < IssuableEntity
expose :merge_status expose :merge_status
expose :merge_user_id expose :merge_user_id
expose :merge_when_build_succeeds expose :merge_when_build_succeeds
<<<<<<< HEAD
expose :rebase_commit_sha expose :rebase_commit_sha
expose :rebase_in_progress?, if: { type: :full } expose :rebase_in_progress?, if: { type: :full }
=======
>>>>>>> ce/master
expose :source_branch expose :source_branch
expose :source_project_id expose :source_project_id
expose :target_branch expose :target_branch
......
...@@ -94,12 +94,7 @@ class GitPushService < BaseService ...@@ -94,12 +94,7 @@ class GitPushService < BaseService
EventCreateService.new.push(@project, current_user, build_push_data) EventCreateService.new.push(@project, current_user, build_push_data)
@project.execute_hooks(build_push_data.dup, :push_hooks) @project.execute_hooks(build_push_data.dup, :push_hooks)
@project.execute_services(build_push_data.dup, :push_hooks) @project.execute_services(build_push_data.dup, :push_hooks)
<<<<<<< HEAD
Ci::CreatePipelineService.new(@project, current_user, build_push_data).execute(mirror_update: mirror_update) Ci::CreatePipelineService.new(@project, current_user, build_push_data).execute(mirror_update: mirror_update)
ProjectCacheWorker.perform_async(@project.id)
=======
Ci::CreatePipelineService.new(@project, current_user, build_push_data).execute
>>>>>>> ce/master
if push_remove_branch? if push_remove_branch?
AfterBranchDeleteService AfterBranchDeleteService
......
...@@ -11,13 +11,8 @@ ...@@ -11,13 +11,8 @@
= render 'projects/merge_requests/widget/open/geo' = render 'projects/merge_requests/widget/open/geo'
- if @project.archived? - if @project.archived?
= render 'projects/merge_requests/widget/open/archived' = render 'projects/merge_requests/widget/open/archived'
<<<<<<< HEAD
- elsif @project.above_size_limit? - elsif @project.above_size_limit?
= render 'projects/merge_requests/widget/open/size_limit_reached' = render 'projects/merge_requests/widget/open/size_limit_reached'
- elsif @merge_request.commits.blank?
= render 'projects/merge_requests/widget/open/nothing'
=======
>>>>>>> ce/master
- elsif @merge_request.branch_missing? - elsif @merge_request.branch_missing?
= render 'projects/merge_requests/widget/open/missing_branch' = render 'projects/merge_requests/widget/open/missing_branch'
- elsif @merge_request.commits.blank? - elsif @merge_request.commits.blank?
......
...@@ -24,8 +24,10 @@ scope(path: 'groups/:id', ...@@ -24,8 +24,10 @@ scope(path: 'groups/:id',
get :activity, as: :activity_group get :activity, as: :activity_group
end end
<<<<<<< HEAD scope(path: 'groups/:group_id',
scope(path: 'groups/:group_id', module: :groups, as: :group) do module: :groups,
as: :group,
constraints: { group_id: Gitlab::Regex.namespace_route_regex }) do
## EE-specific ## EE-specific
resource :analytics, only: [:show] resource :analytics, only: [:show]
resource :ldap, only: [] do resource :ldap, only: [] do
...@@ -37,12 +39,6 @@ scope(path: 'groups/:group_id', module: :groups, as: :group) do ...@@ -37,12 +39,6 @@ scope(path: 'groups/:group_id', module: :groups, as: :group) do
resources :ldap_group_links, only: [:index, :create, :destroy] resources :ldap_group_links, only: [:index, :create, :destroy]
## EE-specific ## EE-specific
=======
scope(path: 'groups/:group_id',
module: :groups,
as: :group,
constraints: { group_id: Gitlab::Regex.namespace_route_regex }) do
>>>>>>> ce/master
resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do
post :resend_invite, on: :member post :resend_invite, on: :member
delete :leave, on: :collection delete :leave, on: :collection
......
...@@ -33,10 +33,7 @@ module API ...@@ -33,10 +33,7 @@ module API
optional :active, type: Boolean, default: false, desc: 'Filters only active users' optional :active, type: Boolean, default: false, desc: 'Filters only active users'
optional :external, type: Boolean, default: false, desc: 'Filters only external users' optional :external, type: Boolean, default: false, desc: 'Filters only external users'
optional :blocked, type: Boolean, default: false, desc: 'Filters only blocked users' optional :blocked, type: Boolean, default: false, desc: 'Filters only blocked users'
<<<<<<< HEAD
optional :skip_ldap, type: Boolean, default: false, desc: 'Skip LDAP users' optional :skip_ldap, type: Boolean, default: false, desc: 'Skip LDAP users'
=======
>>>>>>> ce/master
end end
get do get do
unless can?(current_user, :read_users_list, nil) unless can?(current_user, :read_users_list, nil)
...@@ -48,10 +45,7 @@ module API ...@@ -48,10 +45,7 @@ module API
else else
users = User.all users = User.all
users = users.active if params[:active] users = users.active if params[:active]
<<<<<<< HEAD
users = users.non_ldap if params[:skip_ldap] users = users.non_ldap if params[:skip_ldap]
=======
>>>>>>> ce/master
users = users.search(params[:search]) if params[:search].present? users = users.search(params[:search]) if params[:search].present?
users = users.blocked if params[:blocked] users = users.blocked if params[:blocked]
users = users.external if params[:external] && current_user.is_admin? users = users.external if params[:external] && current_user.is_admin?
......
This diff is collapsed.
...@@ -349,7 +349,6 @@ LabelPriority: ...@@ -349,7 +349,6 @@ LabelPriority:
- priority - priority
- created_at - created_at
- updated_at - updated_at
<<<<<<< HEAD
Timelog: Timelog:
- id - id
- time_spent - time_spent
...@@ -358,5 +357,3 @@ Timelog: ...@@ -358,5 +357,3 @@ Timelog:
- user_id - user_id
- created_at - created_at
- updated_at - updated_at
=======
>>>>>>> ce/master
...@@ -1675,7 +1675,6 @@ describe Repository, models: true do ...@@ -1675,7 +1675,6 @@ describe Repository, models: true do
end end
end end
<<<<<<< HEAD
describe '#push_remote_branches' do describe '#push_remote_branches' do
it 'push branches to the remote repo' do it 'push branches to the remote repo' do
expect_any_instance_of(Gitlab::Shell).to receive(:push_remote_branches). expect_any_instance_of(Gitlab::Shell).to receive(:push_remote_branches).
...@@ -1751,10 +1750,6 @@ describe Repository, models: true do ...@@ -1751,10 +1750,6 @@ describe Repository, models: true do
end end
end end
describe "#keep_around" do
it "does not fail if we attempt to reference bad commit" do
expect(repository.kept_around?('abc1234')).to be_falsey
=======
describe '#commit_count' do describe '#commit_count' do
context 'with a non-existing repository' do context 'with a non-existing repository' do
it 'returns 0' do it 'returns 0' do
...@@ -1762,7 +1757,6 @@ describe Repository, models: true do ...@@ -1762,7 +1757,6 @@ describe Repository, models: true do
expect(repository.commit_count).to eq(0) expect(repository.commit_count).to eq(0)
end end
>>>>>>> ce/master
end end
context 'with an existing repository' do context 'with an existing repository' do
......
...@@ -39,13 +39,7 @@ describe ProjectCacheWorker do ...@@ -39,13 +39,7 @@ describe ProjectCacheWorker do
expect_any_instance_of(Project).to receive(:update_commit_count). expect_any_instance_of(Project).to receive(:update_commit_count).
and_call_original and_call_original
<<<<<<< HEAD
expect_any_instance_of(Repository).to receive(:build_cache).and_call_original
subject.perform(project.id)
=======
worker.perform(project.id) worker.perform(project.id)
>>>>>>> ce/master
end end
it 'refreshes the method caches' do it 'refreshes the method caches' do
......
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