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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c7299701
Commit
c7299701
authored
Sep 18, 2019
by
Hiroyuki Sato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add previous revision link
parent
12970a8a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
2 deletions
+39
-2
app/assets/stylesheets/framework/files.scss
app/assets/stylesheets/framework/files.scss
+8
-0
app/views/projects/blame/show.html.haml
app/views/projects/blame/show.html.haml
+8
-2
changelogs/unreleased/19299-blame-previous-revision.yml
changelogs/unreleased/19299-blame-previous-revision.yml
+5
-0
doc/user/project/repository/git_blame.md
doc/user/project/repository/git_blame.md
+5
-0
doc/user/project/repository/img/file_blame_previous_commit_v12_7.png
...oject/repository/img/file_blame_previous_commit_v12_7.png
+0
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/features/projects/files/user_browses_files_spec.rb
spec/features/projects/files/user_browses_files_spec.rb
+10
-0
No files found.
app/assets/stylesheets/framework/files.scss
View file @
c7299701
...
...
@@ -207,6 +207,14 @@
border-left-color
:
mix
(
$blame-gray
,
$blame-cyan
,
$i
/
4
*
100%
);
}
}
.doc-versions
{
color
:
$gray-600
;
&
:hover
{
color
:
$gray-900
;
}
}
}
&
.logs
{
...
...
app/views/projects/blame/show.html.haml
View file @
c7299701
...
...
@@ -20,8 +20,14 @@
.commit-row-title
%span
.item-title.str-truncated-100
=
link_to
commit
.
title
,
project_commit_path
(
@project
,
commit
.
id
),
class:
"cdark"
,
title:
commit
.
title
.float-right
=
link_to
commit
.
short_id
,
project_commit_path
(
@project
,
commit
),
class:
"commit-sha"
%span
-
previous_commit_id
=
commit
.
parent_id
-
if
previous_commit_id
=
link_to
project_blame_path
(
@project
,
tree_join
(
previous_commit_id
,
@path
)),
title:
_
(
'View blame prior to this change'
),
aria:
{
label:
_
(
'View blame prior to this change'
)
},
data:
{
toggle:
'tooltip'
,
placement:
'right'
,
container:
'body'
}
do
=
sprite_icon
(
'doc-versions'
,
size:
16
,
css_class:
'doc-versions align-text-bottom'
)
.light
=
commit_author_link
(
commit
,
avatar:
false
)
...
...
changelogs/unreleased/19299-blame-previous-revision.yml
0 → 100644
View file @
c7299701
---
title
:
Add previous revision link to blame
merge_request
:
17088
author
:
Hiroyuki Sato
type
:
added
doc/user/project/repository/git_blame.md
View file @
c7299701
...
...
@@ -23,6 +23,11 @@ noted information:
If you hover over a commit in the UI, you'll see a precise date and time
for that commit.
![
Blame previous commit
](
img/file_blame_previous_commit_v12_7.png
"Blame previous commit"
)
To see earlier revisions of a specific line, click
**View blame prior to this change**
until you've found the changes you're interested in viewing.
## Associated `git` command
If you're running
`git`
from the command line, the equivalent command is
...
...
doc/user/project/repository/img/file_blame_previous_commit_v12_7.png
0 → 100644
View file @
c7299701
103 KB
locale/gitlab.pot
View file @
c7299701
...
...
@@ -19982,6 +19982,9 @@ msgstr ""
msgid "View app"
msgstr ""
msgid "View blame prior to this change"
msgstr ""
msgid "View dependency details for your project"
msgstr ""
...
...
spec/features/projects/files/user_browses_files_spec.rb
View file @
c7299701
...
...
@@ -229,6 +229,16 @@ describe "User browses files" do
expect
(
page
).
to
have_content
(
"*.rb"
)
.
and
have_content
(
"Dmitriy Zaporozhets"
)
.
and
have_content
(
"Initial commit"
)
.
and
have_content
(
"Ignore DS files"
)
previous_commit_anchor
=
"//a[@title='Ignore DS files']/parent::span/following-sibling::span/a"
find
(
:xpath
,
previous_commit_anchor
).
click
expect
(
page
).
to
have_content
(
"*.rb"
)
.
and
have_content
(
"Dmitriy Zaporozhets"
)
.
and
have_content
(
"Initial commit"
)
expect
(
page
).
not_to
have_content
(
"Ignore DS files"
)
end
end
...
...
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