Project

General

Profile

Actions

Feature #35432

closed

Git: View annotation prior to the change

Added by Go MAEDA over 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
SCM
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

The "Blame" view of GitHub and Gitlab has a feature called "View blame prior to this change". With the feature, you can easily jump to an older change of the line.

I think it would be useful if Redmine also has the feature. Currently, it requires some manual steps to see older changes in the "Annotate" view of Redmine.


Files


Related issues

Related to Redmine - Feature #38526: Subversion support for "View annotation prior to this change"New

Actions
Actions #1

Updated by Takenori TAKAKI over 3 years ago

I made a patch to display the link to prior revision.
The patch adds a link to "Annotate" view as follows

Actions #2

Updated by Go MAEDA over 3 years ago

  • Target version set to Candidate for next major release
Actions #3

Updated by Mischa The Evil about 3 years ago

  • Subject changed from View annotate prior to the change to Git: View annotate prior to the change

+1 This is a real handy feature when browsing (Git) repositories a lot. Given the usability of this change I wonder if this is something that could be implemented (easily) for other SCMs (Hg, SVN, ...) too?!

Actions #4

Updated by Go MAEDA about 3 years ago

Mischa The Evil wrote:

Given the usability of this change I wonder if this is something that could be implemented (easily) for other SCMs (Hg, SVN, ...) too?!

This feature is easy to implement in the Git adapter because `git blame -p` outputs the previous commit for the line, as shown in the "previous" like of the following sample.

However, `blame` / `annotate` subcommand of other SCMs such as subversion doesn't give the information of the previous change, so we have to find another way to get the previous change.

Since there are so many Git users these days, I think it is a good idea only for Git as a first step.

c91a4391d34b9bd97270d20f04aeb40ee64166a1 1 1 1
author Jean-Philippe Lang
author-mail <jp_lang@yahoo.fr>
author-time 1476985764
author-tz +0000
committer Jean-Philippe Lang
committer-mail <jp_lang@yahoo.fr>
committer-time 1476985764
committer-tz +0000
summary Set https back.
previous 15460450bbe72a756015e16689bcafe5a6b1164b Gemfile
filename Gemfile
        source 'https://rubygems.org'
9315039e0a95b0234b7736f359fc039550f45e08 2 2 1
author Jean-Philippe Lang
author-mail <jp_lang@yahoo.fr>
author-time 1329661846
author-tz +0000
committer Jean-Philippe Lang
committer-mail <jp_lang@yahoo.fr>
committer-time 1329661846
committer-tz +0000
summary Use Bundler for gem management (#5638).
filename Gemfile

Actions #5

Updated by Go MAEDA over 2 years ago

  • Target version changed from Candidate for next major release to 5.1.0

Setting the target version to 5.1.0.

Actions #7

Updated by Go MAEDA over 1 year ago

I have updated the patch not to hard-code Repository::Git constant in app/views/repositories/annotate.html.erb.

Actions #8

Updated by Go MAEDA over 1 year ago

Committed the patch in r22217 with slight modifications. Thank you for your contribution.

The annotate view of a Git repository now has "View annotation prior to this change" buttons.

Actions #9

Updated by Robert Korulczyk over 1 year ago

Go MAEDA wrote in #note-4:

However, `blame` / `annotate` subcommand of other SCMs such as subversion doesn't give the information of the previous change, so we have to find another way to get the previous change.

You don't really need to know revision of previous change for SVN. Since revisions in SVN are sequential numbers, you only need to decrease number of revision of given change and show annotations for this version. For example to see annotations prior r22231 for this file

you need to show annotations for revision 22230: https://www.redmine.org/projects/redmine/repository/svn/revisions/22230/annotate/trunk/app/views/repositories/revision.html.erb

Actions #10

Updated by Go MAEDA over 1 year ago

  • Related to Feature #38526: Subversion support for "View annotation prior to this change" added
Actions #11

Updated by Go MAEDA over 1 year ago

Robert Korulczyk wrote in #note-9:

You don't really need to know revision of previous change for SVN. Since revisions in SVN are sequential numbers, you only need to decrease number of revision of given change and show annotations for this version.

Thank you for your suggestion. I have opened #38526 to implement this feature for Subversion.

Actions #12

Updated by Go MAEDA over 1 year ago

  • Subject changed from Git: View annotate prior to the change to Git: View annotation prior to the change
Actions

Also available in: Atom PDF