error_msg="Sorry, we cannot #{action.to_s.dasherize} this #{@commit.change_type_title(current_user)} automatically.
error_msg="Sorry, we cannot #{action.to_s.dasherize} this #{@commit.change_type_title(current_user)} automatically.
A #{action.to_s.dasherize} may have already been performed with this #{@commit.change_type_title(current_user)}, or a more recent commit may have updated some of its content."
A #{action.to_s.dasherize} may have already been performed with this #{@commit.change_type_title(current_user)}, or a more recent commit may have updated some of its content."
raiseChangeError,error_msg
raiseChangeError,error_msg
else
raise
end
end
end
end
...
@@ -66,16 +57,17 @@ module Commits
...
@@ -66,16 +57,17 @@ module Commits
true
true
end
end
defvalidate_target_branch(new_branch)
defvalidate_target_branch
# Temporary branch exists and contains the change commit
@@ -60,6 +60,7 @@ describe 'Cherry-pick Commits' do
...
@@ -60,6 +60,7 @@ describe 'Cherry-pick Commits' do
click_button'Cherry-pick'
click_button'Cherry-pick'
end
end
expect(page).tohave_content('The commit has been successfully cherry-picked. You can now submit a merge request to get this change into the original branch.')
expect(page).tohave_content('The commit has been successfully cherry-picked. You can now submit a merge request to get this change into the original branch.')
expect(page).tohave_content("From cherry-pick-#{master_pickable_commit.short_id} into master")