Feature #3988


Show diff in revision page

Added by Martin Bagge about 14 years ago. Updated over 10 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


In the revision browser it would be good to have the diff for the current revision. Trac does this and it is a really nice way to get a overview of the changes involved.
See the diffrences between these two links (not the same files but point proven):

The diff view that is accessible in Redmine today could be moved one step up (so I do not have to click the link). Maybe the best way would be to implement the feature as a option for the project to choose, the default view inline could also be chooseable here. Some projects might not want this because of the time it could take to generate the diffes if not cached. (I am sorry if this issue is addressed elsewhere, please direct me there in that case...)

mbagge@mbagge-1:~/redmine$ ruby script/about
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.4
Rails version             2.1.2
Active Record version     2.1.2
Action Pack version       2.1.2
Active Resource version   2.1.2
Action Mailer version     2.1.2
Active Support version    2.1.2
Application root          /home/mbagge/redmine
Environment               development
Database adapter          mysql

About your Redmine plugins
Scrumdashboard plugin          1.2
Redmine Repo Pygments plugin   0.0.2
Redmine Bugcloud plugin
Redmine Backlogs plugin        0.0.1

I am using SVN 0.8-stable btw.

Related issues

Related to Redmine - Feature #4266: Display changeset comment on repository diff view.ClosedJean-Philippe Lang2009-11-23

Related to Redmine - Feature #2762: Hide list of changed files on revision pageClosed2009-02-16

Related to Redmine - Feature #2372: Ideas for the Revisions page New2008-12-22

Related to Redmine - Feature #1443: Making the Repository module as nice as the Trac oneNew2008-06-13

Related to Redmine - Feature #6352: Showing diff of structural changes in repositoryNew2010-09-10

Is duplicate of Redmine - Feature #7139: Highlight changes inside diff linesClosed2010-12-20

Actions #1

Updated by Eric Davis about 14 years ago

  • Category set to SCM
  • Status changed from New to 7
  • Assignee set to Eric Davis

+1 I think providing the diff view on the revision view would be a nice improvement. That way the code can be reviewed along with the comment's about the revision. I'll take a look at implementing this.

Actions #2

Updated by Jean-Philippe Lang about 14 years ago

This should include an on/off application setting. With #4015, we will be able to override at project level.

Actions #3

Updated by Mischa The Evil about 14 years ago

@ Eric: I've related the issue we've briefly discussed over IRC (#4266) to this issue.

Actions #4

Updated by Eric Davis about 13 years ago

  • Assignee deleted (Eric Davis)
Actions #5

Updated by Sven M over 12 years ago

For me it's a very big disadvantage compared to Trac. I'd love to see this in redmine!

Actions #6

Updated by random tao over 12 years ago

i think it's also related to #6352

Actions #7

Updated by Toshi MARUYAMA over 12 years ago

  • Status changed from 7 to Closed
  • Resolution set to Duplicate

This issue feature is implemented in #7139.

Actions #8

Updated by Martin Bagge over 12 years ago

  • Status changed from Closed to Reopened

no this is not solved at all.

Path: .
URL: svn://
Repository Root: svn://
Repository UUID: e93f8b46-1217-0410-a6f0-8f06a7374b81
Revision: 5246
Node Kind: directory
Schedule: normal
Last Changed Author: jplang
Last Changed Rev: 5246
Last Changed Date: 2011-03-28 23:45:30 +0200 (Mon, 28 Mar 2011)

according to the issue you linked it was fixed in r5094 - however it is not. The issue you refer to is about showing the diff as bold not showing the actual diff at the revision information page.

Actions #9

Updated by Toshi MARUYAMA over 12 years ago

  • Resolution deleted (Duplicate)
Actions #10

Updated by Toshi MARUYAMA over 12 years ago

  • Subject changed from Show diff inline with revision to Show diff in revision page
Actions #11

Updated by Christian Jennewein over 12 years ago

+1 from me too.

This is the very last feature that makes us keep TRAC parallel to Redmine. Would be great to have the changeset overview in Redmine too.

Actions #12

Updated by Philipp Schüttlöffel over 11 years ago

I made a solution which works good for me, maybe someone is interrestet.

  • /app/controller/repositories_controller.rb:220 add the following lines:
    def revision
    +     @diff_type = 'inline'
    +     @cache_key = "repositories/diff/#{}/" +
    +                           Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}-#{current_language}")
    +     @diff = @repository.diff(@path, @rev, @rev_to)
  • /app/views/repositories/revision.html.erb:92 add the following lines:
    <div class="changeset-changes">
    <%= render_changeset_changes %>
    +<% cache(@cache_key) do -%>
    +<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
    +<% end -%>
    <% end %>
Actions #13

Updated by yac yac over 11 years ago


Actions #14

Updated by cam lafit over 11 years ago


Thanks for your diff.
Work nicely.

Is it possible to create it as a plugin ? Should be better to maintain redmine (and update step)


Actions #15

Updated by Sylvain UTARD over 10 years ago



Also available in: Atom PDF