##// END OF EJS Templates
pull-requests: added nicer formatting for merge conflicting files
marcink -
r4087:697a75c3 default
parent child Browse files
Show More
@@ -261,7 +261,7 b' class TestPullrequestsView(object):'
261 True, True, '', MergeFailureReason.MISSING_TARGET_REF,
261 True, True, '', MergeFailureReason.MISSING_TARGET_REF,
262 metadata={'target_ref': PullRequest.unicode_to_reference(unicode_reference)})
262 metadata={'target_ref': PullRequest.unicode_to_reference(unicode_reference)})
263 response.assert_response().element_contains(
263 response.assert_response().element_contains(
264 'span[data-role="merge-message"]', merge_resp.merge_status_message)
264 'div[data-role="merge-message"]', merge_resp.merge_status_message)
265
265
266 def test_comment_and_close_pull_request_custom_message_approved(
266 def test_comment_and_close_pull_request_custom_message_approved(
267 self, pr_util, csrf_token, xhr_header):
267 self, pr_util, csrf_token, xhr_header):
@@ -990,7 +990,7 b' class GitRepository(BaseRepository):'
990 except RepositoryError as e:
990 except RepositoryError as e:
991 log.exception('Failure when doing local merge on git shadow repo')
991 log.exception('Failure when doing local merge on git shadow repo')
992 if isinstance(e, UnresolvedFilesInRepo):
992 if isinstance(e, UnresolvedFilesInRepo):
993 metadata['unresolved_files'] = 'file: ' + (', file: '.join(e.args[0]))
993 metadata['unresolved_files'] = '\n* conflict: ' + ('\n * conflict: '.join(e.args[0]))
994
994
995 merge_possible = False
995 merge_possible = False
996 merge_failure_reason = MergeFailureReason.MERGE_FAILED
996 merge_failure_reason = MergeFailureReason.MERGE_FAILED
@@ -830,7 +830,7 b' class MercurialRepository(BaseRepository'
830 except RepositoryError as e:
830 except RepositoryError as e:
831 log.exception('Failure when doing local merge on hg shadow repo')
831 log.exception('Failure when doing local merge on hg shadow repo')
832 if isinstance(e, UnresolvedFilesInRepo):
832 if isinstance(e, UnresolvedFilesInRepo):
833 metadata['unresolved_files'] = 'file: ' + (', file: '.join(e.args[0]))
833 metadata['unresolved_files'] = '\n* conflict: ' + ('\n * conflict: '.join(e.args[0]))
834
834
835 merge_possible = False
835 merge_possible = False
836 merge_failure_reason = MergeFailureReason.MERGE_FAILED
836 merge_failure_reason = MergeFailureReason.MERGE_FAILED
@@ -18,14 +18,14 b''
18 % for pr_check_key, pr_check_details in c.pr_merge_errors.items():
18 % for pr_check_key, pr_check_details in c.pr_merge_errors.items():
19 <% pr_check_type = pr_check_details['error_type'] %>
19 <% pr_check_type = pr_check_details['error_type'] %>
20 <li>
20 <li>
21 <span class="merge-message ${pr_check_type}" data-role="merge-message">
21 <div class="merge-message ${pr_check_type}" data-role="merge-message">
22 - ${pr_check_details['message']}
22 <span style="white-space: pre-line">- ${pr_check_details['message']}</span>
23 % if pr_check_key == 'todo':
23 % if pr_check_key == 'todo':
24 % for co in pr_check_details['details']:
24 % for co in pr_check_details['details']:
25 <a class="permalink" href="#comment-${co.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'), 0, ${h.json.dumps(co.outdated)})"> #${co.comment_id}</a>${'' if loop.last else ','}
25 <a class="permalink" href="#comment-${co.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'), 0, ${h.json.dumps(co.outdated)})"> #${co.comment_id}</a>${'' if loop.last else ','}
26 % endfor
26 % endfor
27 % endif
27 % endif
28 </span>
28 </div>
29 </li>
29 </li>
30 % endfor
30 % endfor
31 </ul>
31 </ul>
General Comments 0
You need to be logged in to leave comments. Login now