diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-15 19:28:21 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-15 19:28:21 +0400 |
commit | be5b6db883ee634dc53e0a50ac57f424507d7a7d (patch) | |
tree | 9f4c78713e823b09b2d293f0a9dd7179358d8917 /app/services | |
parent | 3dc347a369783f2a1fec3b6cc724a9b41a43283c (diff) |
Refactor diff suppress logic and diff views
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/merge_requests/build_service.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/services/merge_requests/build_service.rb b/app/services/merge_requests/build_service.rb index 9c28d3d82d8..fb487539687 100644 --- a/app/services/merge_requests/build_service.rb +++ b/app/services/merge_requests/build_service.rb @@ -39,12 +39,15 @@ module MergeRequests merge_request.compare_failed = false # Try to collect diff for merge request. - # Note: even if diff is huge and we can't show it - we still should allow - # people to create MR. diffs = compare_action.diffs if diffs.present? merge_request.compare_diffs = diffs + + elsif diffs == false + # satellite timeout return false + merge_request.can_be_created = false + merge_request.compare_failed = true end else merge_request.can_be_created = false @@ -55,8 +58,6 @@ module MergeRequests rescue Gitlab::Satellite::BranchesWithoutParent return build_failed(merge_request, "Selected branches have no common commit so they cannot be merged.") - #rescue - #return build_failed(merge_request, "We cannot create merge request because of huge diff.") end def build_failed(merge_request, message) |