Vote #79183
完了Show name changes in diff preview
0%
説明
When previewing uploaded diff/patch files, which contains renames, Redmine will always show the new file name in the diff preview. This can be misleading, since it would not show that the old file was removed.
The attached patch keeps track of the previous file name and shows the additional information in the UI.
!Screen Shot 2018-03-05 at 14.48.00.png!
Please note, this patch was tested with/developed for git's patch files. Also, pure renames (without file modifications) will not be visible -- just like they are today.
journals
!https://www.redmine.org/attachments/download/20223/Screen%20Shot%202018-03-05%20at%2014.48.00.png!
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Nice improvement, setting target version to 4.1.0.
--------------------------------------------------------------------------------
The test @RepositoriesGitControllerTest#test_diff_should_show_filenames@ fails on my environment. Would you look into this?
<pre>
$ ruby test/functional/repositories_git_controller_test.rb
Run options: --seed 19867
# Running:
.......F
Failure:
RepositoriesGitControllerTest#test_diff_should_show_filenames [test/functional/repositories_git_controller_test.rb:432]:
<sources/watchers_controller.rb> expected but was
<copied_README>..
Expected 0 to be >= 1.
/path/to/gems/ruby/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:70:in `method': undefined method `test_diff_should_show_filenames' for class `Minitest::Result' (NameError)
from /path/to/gems/ruby/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:70:in `format_rerun_snippet'
</pre>
<pre>
Rails version 5.1.4
Ruby version 2.3.3-p222 (x86_64-darwin16)
RubyGems version 2.6.10
Rack version 2.0.4
</pre>
--------------------------------------------------------------------------------
Thank you for taking a look. Unfortunately, I didn't set up the test repositories. That's why I didn't catch the test failure.
Attached you may find an updated patch. Now all tests seem to pass fine.
--------------------------------------------------------------------------------
Gregor Schmidt wrote:
> Attached you may find an updated patch. Now all tests seem to pass fine.
Thanks, I confirmed that it passes all tests.
--------------------------------------------------------------------------------
Committed. Thank you for your contribution.
--------------------------------------------------------------------------------