プロジェクト

全般

プロフィール

Vote #79183

完了

Show name changes in diff preview

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Attachments_19
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
19
version_id:
99
issue_org_id:
28295
author_id:
14446
assigned_to_id:
332
comments:
7
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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

Admin Redmine さんが約4年前に更新

  • カテゴリAttachments_19 にセット
  • 対象バージョン4.0.0_99 にセット

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

いいね!0
いいね!0