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

Conflicts:
	CHANGELOG

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2013-11-28 19:26:21 +02:00
commit 2e07865f16
No known key found for this signature in database
GPG Key ID: 2CEAFD2671262EC2
6 changed files with 14 additions and 15 deletions

View File

@ -4,7 +4,6 @@ v 6.4.0
- Fixed another 500 error with submodules
- UI: More compact issues page
- Minimal password length increased to 8 symbols
- Parallel diff view (Steven Thonus)
- Internal projects (Jason Hollingsworth)
v 6.3.0

View File

@ -31,9 +31,9 @@
and
%strong.cred #{@commit.stats.deletions} deletions
- if params[:view] == 'parallel'
= link_to "Unified Diff", url_for(view: 'unified'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'}
= link_to "Inline Diff", url_for(view: 'inline'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'}
- else
= link_to "Parallel Diff", url_for(view: 'parallel'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'}
= link_to "Side-by-side Diff", url_for(view: 'parallel'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'}
.file-stats
= render "projects/commits/diff_head", diffs: diffs

View File

@ -1,4 +1,4 @@
/ Parallel diff view
/ Side-by-side diff view
- old_file = get_old_file(project, @commit, diff)
- deleted_lines = {}
- added_lines = {}

View File

@ -14,12 +14,12 @@ Feature: Project Browse commits
Scenario: I browse commit from list
Given I click on commit link
Then I see commit info
And I see parallel diff button
And I see side-by-side diff button
Scenario: I browse commit with parallel diff view
Scenario: I browse commit with side-by-side diff view
Given I click on commit link
And I click parallel diff button
Then I see unified diff button
And I click side-by-side diff button
Then I see inline diff button
Scenario: I compare refs
Given I visit compare refs page

View File

@ -89,16 +89,16 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
links[1]['href'].should =~ %r{blob/cc1ba255d6c5ffdce87a357ba7ccc397a4f4026b}
end
Given 'I click parallel diff button' do
click_link "Parallel Diff"
Given 'I click side-by-side diff button' do
click_link "Side-by-side Diff"
end
Then 'I see parallel diff button' do
page.should have_content "Parallel Diff"
Then 'I see side-by-side diff button' do
page.should have_content "Side-by-side Diff"
end
Then 'I see unified diff button' do
page.should have_content "Unified Diff"
Then 'I see inline diff button' do
page.should have_content "Inline Diff"
end
end

View File

@ -66,7 +66,7 @@ var DiffHighlightRules = function() {
"regex": "^(?:\\*{15}|={67}|-{3}|\\+{3})$",
"token": "punctuation.definition.separator.diff",
"name": "keyword"
}, { //diff.range.unified
}, { //diff.range.inline
"regex": "^(@@)(\\s*.+?\\s*)(@@)(.*)$",
"token": [
"constant",