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