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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
d80750b5
Commit
d80750b5
authored
Sep 22, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error when MR source branch no longer exists.
parent
0ce5fb71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-2
app/views/projects/merge_requests/widget/_merged.html.haml
app/views/projects/merge_requests/widget/_merged.html.haml
+1
-1
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
d80750b5
...
...
@@ -258,8 +258,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@commits
=
@merge_request
.
commits
@merge_request_diff
=
@merge_request
.
merge_request_diff
@source_branch
=
@merge_request
.
source_project
.
repository
.
find_branch
(
@merge_request
.
source_branch
).
try
(
:name
)
if
@merge_request
.
locked_long_ago?
@merge_request
.
unlock_mr
@merge_request
.
close
...
...
app/views/projects/merge_requests/widget/_merged.html.haml
View file @
d80750b5
...
...
@@ -20,7 +20,7 @@
The changes were merged into
%span
.label-branch
=
@merge_request
.
target_branch
You can remove the source branch now.
=
link_to
namespace_project_branch_path
(
@merge_request
.
source_project
.
namespace
,
@merge_request
.
source_project
,
@source_branch
),
remote:
true
,
method: :delete
,
class:
"btn btn-primary btn-sm remove_source_branch"
do
=
link_to
namespace_project_branch_path
(
@merge_request
.
source_project
.
namespace
,
@merge_request
.
source_project
,
@
merge_request
.
source_branch
),
remote:
true
,
method: :delete
,
class:
"btn btn-primary btn-sm remove_source_branch"
do
%i
.fa.fa-times
Remove Source Branch
...
...
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