Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
ca1526e7
Commit
ca1526e7
authored
11 years ago
by
Sytse Sijbrandij
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Conventional naming for diff modes.
parent
526c2fdf
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
15 deletions
+15
-15
CHANGELOG
CHANGELOG
+1
-1
app/views/projects/commits/_diffs.html.haml
app/views/projects/commits/_diffs.html.haml
+2
-2
app/views/projects/commits/_parallel_view.html.haml
app/views/projects/commits/_parallel_view.html.haml
+1
-1
features/project/commits/commits.feature
features/project/commits/commits.feature
+4
-4
features/steps/project/project_browse_commits.rb
features/steps/project/project_browse_commits.rb
+6
-6
vendor/assets/javascripts/ace-src-noconflict/mode-diff.js
vendor/assets/javascripts/ace-src-noconflict/mode-diff.js
+1
-1
No files found.
CHANGELOG
View file @
ca1526e7
...
@@ -4,7 +4,7 @@ v 6.4.0
...
@@ -4,7 +4,7 @@ v 6.4.0
- Fixed another 500 error with submodules
- Fixed another 500 error with submodules
- UI: More compact issues page
- UI: More compact issues page
- Minimal password length increased to 8 symbols
- Minimal password length increased to 8 symbols
-
Parallel
diff view (Steven Thonus)
-
Side-by-side
diff view (Steven Thonus)
v 6.3.0
v 6.3.0
- API for adding gitlab-ci service
- API for adding gitlab-ci service
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/commits/_diffs.html.haml
View file @
ca1526e7
...
@@ -31,9 +31,9 @@
...
@@ -31,9 +31,9 @@
and
and
%strong
.cred
#{
@commit
.
stats
.
deletions
}
deletions
%strong
.cred
#{
@commit
.
stats
.
deletions
}
deletions
-
if
params
[
:view
]
==
'parallel'
-
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
-
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
.file-stats
=
render
"projects/commits/diff_head"
,
diffs:
diffs
=
render
"projects/commits/diff_head"
,
diffs:
diffs
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/commits/_parallel_view.html.haml
View file @
ca1526e7
/
Parallel
diff view
/
Side-by-side
diff view
-
old_file
=
get_old_file
(
project
,
@commit
,
diff
)
-
old_file
=
get_old_file
(
project
,
@commit
,
diff
)
-
deleted_lines
=
{}
-
deleted_lines
=
{}
-
added_lines
=
{}
-
added_lines
=
{}
...
...
This diff is collapsed.
Click to expand it.
features/project/commits/commits.feature
View file @
ca1526e7
...
@@ -14,12 +14,12 @@ Feature: Project Browse commits
...
@@ -14,12 +14,12 @@ Feature: Project Browse commits
Scenario
:
I
browse commit from list
Scenario
:
I
browse commit from list
Given
I click on commit link
Given
I click on commit link
Then
I see commit info
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
Given
I click on commit link
And
I click
parallel
diff button
And
I click
side-by-side
diff button
Then
I see
unified
diff button
Then
I see
inline
diff button
Scenario
:
I
compare refs
Scenario
:
I
compare refs
Given
I visit compare refs page
Given
I visit compare refs page
...
...
This diff is collapsed.
Click to expand it.
features/steps/project/project_browse_commits.rb
View file @
ca1526e7
...
@@ -89,16 +89,16 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
...
@@ -89,16 +89,16 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
links
[
1
][
'href'
].
should
=~
%r{blob/cc1ba255d6c5ffdce87a357ba7ccc397a4f4026b}
links
[
1
][
'href'
].
should
=~
%r{blob/cc1ba255d6c5ffdce87a357ba7ccc397a4f4026b}
end
end
Given
'I click
parallel
diff button'
do
Given
'I click
side-by-side
diff button'
do
click_link
"
Parallel
Diff"
click_link
"
side-by-side
Diff"
end
end
Then
'I see
parallel
diff button'
do
Then
'I see
side-by-side
diff button'
do
page
.
should
have_content
"
Parallel
Diff"
page
.
should
have_content
"
Side-by-side
Diff"
end
end
Then
'I see
unified
diff button'
do
Then
'I see
inline
diff button'
do
page
.
should
have_content
"
Unified
Diff"
page
.
should
have_content
"
Inline
Diff"
end
end
end
end
This diff is collapsed.
Click to expand it.
vendor/assets/javascripts/ace-src-noconflict/mode-diff.js
View file @
ca1526e7
...
@@ -66,7 +66,7 @@ var DiffHighlightRules = function() {
...
@@ -66,7 +66,7 @@ var DiffHighlightRules = function() {
"
regex
"
:
"
^(?:
\\
*{15}|={67}|-{3}|
\\
+{3})$
"
,
"
regex
"
:
"
^(?:
\\
*{15}|={67}|-{3}|
\\
+{3})$
"
,
"
token
"
:
"
punctuation.definition.separator.diff
"
,
"
token
"
:
"
punctuation.definition.separator.diff
"
,
"
name
"
:
"
keyword
"
"
name
"
:
"
keyword
"
},
{
//diff.range.
unified
},
{
//diff.range.
inline
"
regex
"
:
"
^(@@)(
\\
s*.+?
\\
s*)(@@)(.*)$
"
,
"
regex
"
:
"
^(@@)(
\\
s*.+?
\\
s*)(@@)(.*)$
"
,
"
token
"
:
[
"
token
"
:
[
"
constant
"
,
"
constant
"
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment