Commit 2e07865f16f96bc4706758cc5f2634574d38be37

Authored by Dmitriy Zaporozhets
2 parents 20bcbc19 68726c5b

Merge remote-tracking branch 'origin/side-by-side'

Conflicts:
	CHANGELOG

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
@@ -4,7 +4,6 @@ v 6.4.0 @@ -4,7 +4,6 @@ v 6.4.0
4 - Fixed another 500 error with submodules 4 - Fixed another 500 error with submodules
5 - UI: More compact issues page 5 - UI: More compact issues page
6 - Minimal password length increased to 8 symbols 6 - Minimal password length increased to 8 symbols
7 - - Parallel diff view (Steven Thonus)  
8 - Internal projects (Jason Hollingsworth) 7 - Internal projects (Jason Hollingsworth)
9 8
10 v 6.3.0 9 v 6.3.0
app/views/projects/commits/_diffs.html.haml
@@ -31,9 +31,9 @@ @@ -31,9 +31,9 @@
31 and 31 and
32 %strong.cred #{@commit.stats.deletions} deletions 32 %strong.cred #{@commit.stats.deletions} deletions
33 - if params[:view] == 'parallel' 33 - if params[:view] == 'parallel'
34 - = link_to "Unified Diff", url_for(view: 'unified'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'} 34 + = link_to "Inline Diff", url_for(view: 'inline'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'}
35 - else 35 - else
36 - = link_to "Parallel Diff", url_for(view: 'parallel'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'} 36 + = link_to "Side-by-side Diff", url_for(view: 'parallel'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'}
37 .file-stats 37 .file-stats
38 = render "projects/commits/diff_head", diffs: diffs 38 = render "projects/commits/diff_head", diffs: diffs
39 39
app/views/projects/commits/_parallel_view.html.haml
1 -/ Parallel diff view 1 +/ Side-by-side diff view
2 - old_file = get_old_file(project, @commit, diff) 2 - old_file = get_old_file(project, @commit, diff)
3 - deleted_lines = {} 3 - deleted_lines = {}
4 - added_lines = {} 4 - added_lines = {}
features/project/commits/commits.feature
@@ -14,12 +14,12 @@ Feature: Project Browse commits @@ -14,12 +14,12 @@ Feature: Project Browse commits
14 Scenario: I browse commit from list 14 Scenario: I browse commit from list
15 Given I click on commit link 15 Given I click on commit link
16 Then I see commit info 16 Then I see commit info
17 - And I see parallel diff button 17 + And I see side-by-side diff button
18 18
19 - Scenario: I browse commit with parallel diff view 19 + Scenario: I browse commit with side-by-side diff view
20 Given I click on commit link 20 Given I click on commit link
21 - And I click parallel diff button  
22 - Then I see unified diff button 21 + And I click side-by-side diff button
  22 + Then I see inline diff button
23 23
24 Scenario: I compare refs 24 Scenario: I compare refs
25 Given I visit compare refs page 25 Given I visit compare refs page
features/steps/project/project_browse_commits.rb
@@ -89,16 +89,16 @@ class ProjectBrowseCommits &lt; Spinach::FeatureSteps @@ -89,16 +89,16 @@ class ProjectBrowseCommits &lt; Spinach::FeatureSteps
89 links[1]['href'].should =~ %r{blob/cc1ba255d6c5ffdce87a357ba7ccc397a4f4026b} 89 links[1]['href'].should =~ %r{blob/cc1ba255d6c5ffdce87a357ba7ccc397a4f4026b}
90 end 90 end
91 91
92 - Given 'I click parallel diff button' do  
93 - click_link "Parallel Diff" 92 + Given 'I click side-by-side diff button' do
  93 + click_link "Side-by-side Diff"
94 end 94 end
95 95
96 - Then 'I see parallel diff button' do  
97 - page.should have_content "Parallel Diff" 96 + Then 'I see side-by-side diff button' do
  97 + page.should have_content "Side-by-side Diff"
98 end 98 end
99 99
100 - Then 'I see unified diff button' do  
101 - page.should have_content "Unified Diff" 100 + Then 'I see inline diff button' do
  101 + page.should have_content "Inline Diff"
102 end 102 end
103 103
104 end 104 end
vendor/assets/javascripts/ace-src-noconflict/mode-diff.js
@@ -66,7 +66,7 @@ var DiffHighlightRules = function() { @@ -66,7 +66,7 @@ var DiffHighlightRules = function() {
66 "regex": "^(?:\\*{15}|={67}|-{3}|\\+{3})$", 66 "regex": "^(?:\\*{15}|={67}|-{3}|\\+{3})$",
67 "token": "punctuation.definition.separator.diff", 67 "token": "punctuation.definition.separator.diff",
68 "name": "keyword" 68 "name": "keyword"
69 - }, { //diff.range.unified 69 + }, { //diff.range.inline
70 "regex": "^(@@)(\\s*.+?\\s*)(@@)(.*)$", 70 "regex": "^(@@)(\\s*.+?\\s*)(@@)(.*)$",
71 "token": [ 71 "token": [
72 "constant", 72 "constant",