Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e2b253dd
Commit
e2b253dd
authored
May 12, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve controllers, helpers, presenters & serializers conflicts
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
0f335323
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
3 additions
and
66 deletions
+3
-66
app/controllers/projects/branches_controller.rb
app/controllers/projects/branches_controller.rb
+0
-5
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+0
-3
app/models/project.rb
app/models/project.rb
+2
-4
app/presenters/merge_request_presenter.rb
app/presenters/merge_request_presenter.rb
+0
-12
app/serializers/environment_entity.rb
app/serializers/environment_entity.rb
+0
-5
app/serializers/merge_request_basic_entity.rb
app/serializers/merge_request_basic_entity.rb
+0
-3
app/serializers/merge_request_entity.rb
app/serializers/merge_request_entity.rb
+0
-9
app/services/ci/create_pipeline_service.rb
app/services/ci/create_pipeline_service.rb
+1
-5
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+0
-6
spec/helpers/merge_requests_helper_spec.rb
spec/helpers/merge_requests_helper_spec.rb
+0
-3
spec/presenters/merge_request_presenter_spec.rb
spec/presenters/merge_request_presenter_spec.rb
+0
-3
spec/serializers/merge_request_entity_spec.rb
spec/serializers/merge_request_entity_spec.rb
+0
-4
spec/serializers/pipeline_serializer_spec.rb
spec/serializers/pipeline_serializer_spec.rb
+0
-4
No files found.
app/controllers/projects/branches_controller.rb
View file @
e2b253dd
...
...
@@ -83,13 +83,8 @@ class Projects::BranchesController < Projects::ApplicationController
redirect_to
namespace_project_branches_path
(
@project
.
namespace
,
@project
),
status:
303
end
<<<<<<<
HEAD
format
.
js
{
render
nothing:
true
,
status:
status
[
:return_code
]
}
format
.
json
{
render
json:
{
message:
status
[
:message
]
},
status:
status
[
:return_code
]
}
=======
format
.
js
{
render
nothing:
true
,
status:
result
[
:return_code
]
}
format
.
json
{
render
json:
{
message:
result
[
:message
]
},
status:
result
[
:return_code
]
}
>>>>>>>
upstream
/
master
end
end
...
...
app/helpers/merge_requests_helper.rb
View file @
e2b253dd
...
...
@@ -60,7 +60,6 @@ module MergeRequestsHelper
)
end
<<<<<<<
HEAD
def
render_items_list
(
items
,
separator
=
"and"
)
items_cnt
=
items
.
size
...
...
@@ -100,8 +99,6 @@ module MergeRequestsHelper
str
end
=======
>>>>>>>
upstream
/
master
def
format_mr_branch_names
(
merge_request
)
source_path
=
merge_request
.
source_project_path
target_path
=
merge_request
.
target_project_path
...
...
app/models/project.rb
View file @
e2b253dd
...
...
@@ -184,11 +184,9 @@ class Project < ActiveRecord::Base
has_many
:remote_mirrors
,
inverse_of: :project
,
dependent: :destroy
has_many
:environments
,
dependent: :destroy
has_many
:deployments
,
dependent: :destroy
<<<<<<<
HEAD
has_many
:path_locks
,
dependent: :destroy
=======
has_many
:pipeline_schedules
,
dependent: :destroy
,
class_name:
'Ci::PipelineSchedule'
>>>>>>>
upstream
/
master
has_many
:path_locks
,
dependent: :destroy
has_many
:active_runners
,
->
{
active
},
through: :runner_projects
,
source: :runner
,
class_name:
'Ci::Runner'
...
...
app/presenters/merge_request_presenter.rb
View file @
e2b253dd
...
...
@@ -81,7 +81,6 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
end
end
<<<<<<<
HEAD
def
rebase_path
if
!
rebase_in_progress?
&&
should_be_rebased?
&&
user_can_push_to_source_branch?
rebase_namespace_project_merge_request_path
(
project
.
namespace
,
...
...
@@ -90,8 +89,6 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
end
end
=======
>>>>>>>
upstream
/
master
def
target_branch_commits_path
if
target_branch_exists?
namespace_project_commits_path
(
project
.
namespace
,
project
,
target_branch
)
...
...
@@ -104,7 +101,6 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
end
end
<<<<<<<
HEAD
def
approvals_path
if
requires_approve?
approvals_namespace_project_merge_request_path
(
project
.
namespace
,
...
...
@@ -113,8 +109,6 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
end
end
=======
>>>>>>>
upstream
/
master
def
source_branch_with_namespace_link
namespace
=
source_project_namespace
branch
=
source_branch
...
...
@@ -161,13 +155,10 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
user_can_collaborate_with_project?
&&
can_be_cherry_picked?
end
<<<<<<<
HEAD
def
can_push_to_source_branch?
source_branch_exists?
&&
user_can_push_to_source_branch?
end
=======
>>>>>>>
upstream
/
master
private
def
closing_issues
...
...
@@ -186,15 +177,12 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
end
.
sort
.
to_sentence
end
<<<<<<<
HEAD
def
user_can_push_to_source_branch?
::
Gitlab
::
UserAccess
.
new
(
current_user
,
project:
source_project
)
.
can_push_to_branch?
(
source_branch
)
end
=======
>>>>>>>
upstream
/
master
def
user_can_collaborate_with_project?
can?
(
current_user
,
:push_code
,
project
)
||
(
current_user
&&
current_user
.
already_forked?
(
project
))
...
...
app/serializers/environment_entity.rb
View file @
e2b253dd
...
...
@@ -30,13 +30,8 @@ class EnvironmentEntity < Grape::Entity
environment
)
end
<<<<<<<
HEAD
expose
:terminal_path
,
if:
->
(
environment
,
_
)
{
environment
.
deployment_service_ready?
}
do
|
environment
|
can?
(
request
.
user
,
:admin_environment
,
environment
.
project
)
&&
=======
expose
:terminal_path
,
if:
->
(
environment
,
_
)
{
environment
.
has_terminals?
}
do
|
environment
|
can?
(
request
.
current_user
,
:admin_environment
,
environment
.
project
)
&&
>>>>>>>
upstream
/
master
terminal_namespace_project_environment_path
(
environment
.
project
.
namespace
,
environment
.
project
,
...
...
app/serializers/merge_request_basic_entity.rb
View file @
e2b253dd
...
...
@@ -7,8 +7,5 @@ class MergeRequestBasicEntity < Grape::Entity
expose
:total_time_spent
expose
:human_time_estimate
expose
:human_total_time_spent
<<<<<<<
HEAD
expose
:rebase_in_progress?
,
as: :rebase_in_progress
=======
>>>>>>>
upstream
/
master
end
app/serializers/merge_request_entity.rb
View file @
e2b253dd
class
MergeRequestEntity
<
IssuableEntity
<<<<<<<
HEAD
expose
:approvals_before_merge
=======
include
RequestAwareEntity
>>>>>>>
upstream
/
master
expose
:assignee_id
include
RequestAwareEntity
...
...
@@ -21,7 +15,6 @@ class MergeRequestEntity < IssuableEntity
expose
:target_branch
expose
:target_project_id
<<<<<<<
HEAD
# EE-specific
expose
:approvals_before_merge
expose
:squash
...
...
@@ -42,8 +35,6 @@ class MergeRequestEntity < IssuableEntity
presenter
(
merge_request
).
approvals_path
end
=======
>>>>>>>
upstream
/
master
# Events
expose
:merge_event
,
using:
EventEntity
expose
:closed_event
,
using:
EventEntity
...
...
app/services/ci/create_pipeline_service.rb
View file @
e2b253dd
...
...
@@ -2,11 +2,7 @@ module Ci
class
CreatePipelineService
<
BaseService
attr_reader
:pipeline
<<<<<<<
HEAD
def
execute
(
ignore_skip_ci:
false
,
save_on_errors:
true
,
trigger_request:
nil
,
mirror_update:
false
)
=======
def
execute
(
ignore_skip_ci:
false
,
save_on_errors:
true
,
trigger_request:
nil
,
schedule:
nil
)
>>>>>>>
upstream
/
master
def
execute
(
ignore_skip_ci:
false
,
save_on_errors:
true
,
trigger_request:
nil
,
schedule:
nil
,
mirror_update:
false
)
@pipeline
=
Ci
::
Pipeline
.
new
(
project:
project
,
ref:
ref
,
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
e2b253dd
...
...
@@ -59,7 +59,6 @@ describe Projects::MergeRequestsController do
end
end
<<<<<<<
HEAD
describe
'POST #create'
do
def
create_merge_request
(
overrides
=
{})
params
=
{
...
...
@@ -223,8 +222,6 @@ describe Projects::MergeRequestsController do
end
end
=======
>>>>>>>
upstream
/
master
describe
'GET commit_change_content'
do
it
'renders commit_change_content template'
do
get
:commit_change_content
,
...
...
@@ -560,10 +557,7 @@ describe Projects::MergeRequestsController do
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
,
<<<<<<<
HEAD
squash:
false
,
=======
>>>>>>>
upstream
/
master
format:
'json'
}
end
...
...
spec/helpers/merge_requests_helper_spec.rb
View file @
e2b253dd
...
...
@@ -40,7 +40,6 @@ describe MergeRequestsHelper do
it
{
is_expected
.
to
eq
([
source_title
,
target_title
])
}
end
end
<<<<<<<
HEAD
describe
'#render_items_list'
do
it
"returns one item in the list"
do
...
...
@@ -55,6 +54,4 @@ describe MergeRequestsHelper do
expect
(
render_items_list
(
%w(user user1 user2)
)).
to
eq
(
"user, user1 and user2"
)
end
end
=======
>>>>>>>
upstream
/
master
end
spec/presenters/merge_request_presenter_spec.rb
View file @
e2b253dd
...
...
@@ -353,7 +353,6 @@ describe MergeRequestPresenter do
end
end
end
<<<<<<<
HEAD
describe
'#can_push_to_source_branch'
do
before
do
...
...
@@ -482,6 +481,4 @@ describe MergeRequestPresenter do
end
end
end
=======
>>>>>>>
upstream
/
master
end
spec/serializers/merge_request_entity_spec.rb
View file @
e2b253dd
...
...
@@ -47,16 +47,12 @@ describe MergeRequestEntity do
:cancel_merge_when_pipeline_succeeds_path
,
:create_issue_to_resolve_discussions_path
,
:source_branch_path
,
:target_branch_commits_path
,
<<<<<<<
HEAD
:commits_count
,
## EE
:can_push_to_source_branch
,
:approvals_before_merge
,
:squash
,
:rebase_commit_sha
,
:rebase_in_progress
,
:approved
,
:should_be_rebased
,
:rebase_path
,
:approvals_path
,
:ff_only_enabled
)
=======
:commits_count
)
>>>>>>>
upstream
/
master
end
it
'has email_patches_path'
do
...
...
spec/serializers/pipeline_serializer_spec.rb
View file @
e2b253dd
...
...
@@ -113,11 +113,7 @@ describe PipelineSerializer do
it
"verifies number of queries"
do
recorded
=
ActiveRecord
::
QueryRecorder
.
new
{
subject
}
<<<<<<<
HEAD
expect
(
recorded
.
count
).
to
be_within
(
1
).
of
(
61
)
=======
expect
(
recorded
.
count
).
to
be_within
(
1
).
of
(
58
)
>>>>>>>
upstream
/
master
expect
(
recorded
.
cached_count
).
to
eq
(
0
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment