diff --git a/lib/redmine/unified_diff.rb b/lib/redmine/unified_diff.rb index 69fdaa6fd..7649ed653 100644 --- a/lib/redmine/unified_diff.rb +++ b/lib/redmine/unified_diff.rb @@ -124,6 +124,9 @@ module Redmine # remove leading a/ b/ @file_name = arg.sub(%r{^(a|b)/}, '') end + when "Subversion" + # removing trailing "(revision nn)" + @file_name = arg.sub(%r{\t+\(.*\)$}, '') else @file_name = arg end diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb index 42e4863c5..52352a816 100644 --- a/test/functional/repositories_subversion_controller_test.rb +++ b/test/functional/repositories_subversion_controller_test.rb @@ -315,8 +315,8 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase get :diff, :id => PRJ_ID, :rev => 3, :type => dt assert_response :success assert_template 'diff' - assert_tag :tag => 'h2', - :content => / 3/ + assert_select 'h2', :text => /Revision 3/ + assert_select 'th.filename', :text => 'subversion_test/textfile.txt' end end