Project

General

Profile

Actions

Patch #28295

closed

Show name changes in diff preview

Added by Gregor Schmidt about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Attachments
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

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.


Files

Actions #1

Updated by Gregor Schmidt about 6 years ago

Actions #2

Updated by Go MAEDA about 6 years ago

  • Target version set to Candidate for next major release
Actions #3

Updated by Go MAEDA about 6 years ago

  • Target version changed from Candidate for next major release to 4.1.0

Nice improvement, setting target version to 4.1.0.

Actions #4

Updated by Go MAEDA about 6 years ago

  • Status changed from New to Needs feedback
  • Assignee set to Gregor Schmidt

The test RepositoriesGitControllerTest#test_diff_should_show_filenames fails on my environment. Would you look into this?

$ 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'
Rails version             5.1.4
Ruby version              2.3.3-p222 (x86_64-darwin16)
RubyGems version          2.6.10
Rack version              2.0.4
Actions #5

Updated by Gregor Schmidt almost 6 years ago

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.

Actions #6

Updated by Go MAEDA almost 6 years ago

  • Status changed from Needs feedback to New
  • Assignee deleted (Gregor Schmidt)

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.

Actions #7

Updated by Go MAEDA almost 6 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0

Committed. Thank you for your contribution.

Actions

Also available in: Atom PDF