プロジェクト

全般

プロフィール

Vote #65822

未完了

Show diff in revision page

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
Reopend
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
-
開始日:
2009/10/07
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
0
issue_org_id:
3988
author_id:
8564
assigned_to_id:
0
comments:
15
status_id:
8
tracker_id:
2
plus1:
4
affected_version:
closed_on:
affected_version_id:
ステータス-->[Reopend]

説明

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        0.0.2.1
Redmine Backlogs plugin        0.0.1

I am using SVN 0.8-stable btw.


journals

+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.
--------------------------------------------------------------------------------
This should include an on/off application setting. With #4015, we will be able to override at project level.
--------------------------------------------------------------------------------
@ Eric: I've related the issue we've briefly discussed over IRC (#4266) to this issue.
--------------------------------------------------------------------------------
For me it's a very big disadvantage compared to Trac. I'd love to see this in redmine!
--------------------------------------------------------------------------------
i think it's also related to #6352
--------------------------------------------------------------------------------
This issue feature is implemented in #7139.
--------------------------------------------------------------------------------
what?
no this is not solved at all.

<pre>
Path: .
URL: svn://rubyforge.org/var/svn/redmine/trunk
Repository Root: svn://rubyforge.org/var/svn/redmine
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)
</pre>

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.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
+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.
--------------------------------------------------------------------------------
I made a solution which works good for me, maybe someone is interrestet.

* /app/controller/repositories_controller.rb:220 add the following lines:
<pre>
def revision
+ @diff_type = 'inline'
+ @cache_key = "repositories/diff/#{@repository.id}/" +
+ Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}-#{current_language}")
+ @diff = @repository.diff(@path, @rev, @rev_to)
</pre>

* /app/views/repositories/revision.html.erb:92 add the following lines:
<pre>
<div class="changeset-changes">
<%= render_changeset_changes %>
</div>

+<h3>Changes</h3>
+<% cache(@cache_key) do -%>
+<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
+<% end -%>

<% end %>
</pre>
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
Hi

Thanks for your diff.
Work nicely.

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

Thanks
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------


related_issues

relates,Closed,4266,Display changeset comment on repository diff view.
relates,Closed,2762,Hide list of changed files on revision page
relates,New,2372,Ideas for the Revisions page
relates,New,1443,Making the Repository module as nice as the Trac one
relates,New,6352,Showing diff of structural changes in repository
duplicates,Closed,7139,Highlight changes inside diff lines

Admin Redmine さんがほぼ2年前に更新

  • カテゴリSCM_3 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0