diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index 707e87fd1..95e9acc80 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -521,6 +521,12 @@ update
end
end
+ # 没次提交对应的文件差异
+ def commit_diff
+
+ end
+
+
def diff
if params[:format] == 'diff'
@diff = @repository.diff(@path, @rev, @rev_to)
diff --git a/app/views/repositories/_revisions.html.erb b/app/views/repositories/_revisions.html.erb
index 4d6e39f88..6de04b1d2 100644
--- a/app/views/repositories/_revisions.html.erb
+++ b/app/views/repositories/_revisions.html.erb
@@ -40,7 +40,7 @@
<%= textilizable(truncate_at_line_break(changeset.message)) %>
- <%= h truncate(changeset.short_id.to_s, :length => 20) %>
+ <%= link_to truncate(changeset.short_id.to_s, :length => 20), :controller => 'repositories', :action => 'revision', :id => repository.project, :repository_id => repository.identifier_param, :rev => rev %>
diff --git a/config/routes.rb b/config/routes.rb
index 7060e4eb6..310fe29dd 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -831,7 +831,7 @@ RedmineApp::Application.routes.draw do
:controller => 'repositories',
:format => false,
:constraints => {
- :action => /(browse|show|entry|raw|annotate|diff)/,
+ :action => /(browse|show|entry|raw|annotate|diff|commit_diff)/,
:rev => /[a-z0-9\.\-_]+/
}
@@ -850,15 +850,15 @@ RedmineApp::Application.routes.draw do
:controller => 'repositories',
:format => false,
:constraints => {
- :action => /(browse|show|entry|raw|annotate|diff)/,
+ :action => /(browse|show|entry|raw|annotate|diff|commit_diff)/,
:rev => /[a-z0-9\.\-_]+/
}
get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))',
:controller => 'repositories',
- :action => /(browse|show|entry|raw|changes|annotate|diff)/
+ :action => /(browse|show|entry|raw|changes|annotate|diff|commit_diff)/
get 'projects/:id/repository/:action(/*path(.:ext))',
:controller => 'repositories',
- :action => /(browse|show|entry|raw|changes|annotate|diff)/
+ :action => /(browse|show|entry|raw|changes|annotate|diff|commit_diff)/
get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil
get 'projects/:id/repository', :to => 'repositories#show', :path => nil