Actions
Defect #29730
closedPrevious/Next link on repository page disappear when switching to "View differences" tab
Added by Go MAEDA almost 6 years ago. Updated almost 6 years ago.
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Affected version:
Description
See the screenshots below.
Files
changes-tab@2x.png (33.1 KB) changes-tab@2x.png | Go MAEDA, 2018-10-04 17:44 | ||
diff-tab@2x.png (35.6 KB) diff-tab@2x.png | Go MAEDA, 2018-10-04 17:44 | ||
fix-29730.patch (1.19 KB) fix-29730.patch | Mizuki ISHIKAWA, 2018-10-15 06:40 |
Related issues
Updated by Go MAEDA almost 6 years ago
- Related to Feature #26576: Use tabs to switch between file changes and diff of a commit added
Updated by Mizuki ISHIKAWA almost 6 years ago
- File fix-29730.patch fix-29730.patch added
By applying this patch I think that the Previous/Next link will be displayed.
Updated by Go MAEDA almost 6 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed. Thank you for fixing this issue.
Updated by Go MAEDA almost 6 years ago
- Status changed from Closed to Reopened
- Target version changed from 4.0.0 to Candidate for next major release
- Resolution deleted (
Fixed)
The patch breaks some tests. Reverted the change.
# Running: ..........................................................................................................................................................................F Failure: RepositoriesGitTest#test_diff_two_revs [/var/lib/jenkins/workspace/trunk/DATABASE_ADAPTER/sqlite3/RUBY_VER/ruby-2.5/test/integration/repositories_git_test.rb:47]: Expected response to be a <2XX: success>, but was a <500: Internal Server Error> bin/rails test test/integration/repositories_git_test.rb:45 ...............................................................................................................................................................................................................................................................................................................................................................................................................SS...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E Error: RepositoriesGitControllerTest#test_save_diff_type: ActionView::Template::Error: undefined method `previous' for nil:NilClass app/views/repositories/diff.html.erb:3:in `_app_views_repositories_diff_html_erb__749227865__1013454858' lib/redmine/sudo_mode.rb:63:in `sudo_mode' test/functional/repositories_git_controller_test.rb:472:in `test_save_diff_type' bin/rails test test/functional/repositories_git_controller_test.rb:464 ...........E Error: RepositoriesGitControllerTest#test_diff_path_in_subrepo: ActionView::Template::Error: undefined method `previous' for nil:NilClass app/views/repositories/diff.html.erb:3:in `_app_views_repositories_diff_html_erb__749227865__1013454858' lib/redmine/sudo_mode.rb:63:in `sudo_mode' test/functional/repositories_git_controller_test.rb:414:in `test_diff_path_in_subrepo' bin/rails test test/functional/repositories_git_controller_test.rb:404 ...E Error: RepositoriesGitControllerTest#test_diff_should_show_filenames: ActionView::Template::Error: undefined method `previous' for nil:NilClass app/views/repositories/diff.html.erb:3:in `_app_views_repositories_diff_html_erb__749227865__1013454858' lib/redmine/sudo_mode.rb:63:in `sudo_mode' test/functional/repositories_git_controller_test.rb:451:in `test_diff_should_show_filenames' bin/rails test test/functional/repositories_git_controller_test.rb:450 ......E Error: RepositoriesGitControllerTest#test_diff_latin_1: ActionView::Template::Error: undefined method `previous' for nil:NilClass app/views/repositories/diff.html.erb:3:in `_app_views_repositories_diff_html_erb__749227865__1013454858' lib/redmine/sudo_mode.rb:63:in `sudo_mode' test/functional/repositories_git_controller_test.rb:433:in `block (3 levels) in test_diff_latin_1' test/functional/repositories_git_controller_test.rb:432:in `each' test/functional/repositories_git_controller_test.rb:432:in `block (2 levels) in test_diff_latin_1' test/functional/repositories_git_controller_test.rb:431:in `each' test/functional/repositories_git_controller_test.rb:431:in `block in test_diff_latin_1' test/test_helper.rb:93:in `with_settings' test/functional/repositories_git_controller_test.rb:430:in `test_diff_latin_1' bin/rails test test/functional/repositories_git_controller_test.rb:426 ..........................................................................................................................................................................................................................................................................................E Error: RepositoriesMercurialControllerTest#test_diff_should_show_deleted_filenames: ActionView::Template::Error: undefined method `previous' for nil:NilClass app/views/repositories/diff.html.erb:3:in `_app_views_repositories_diff_html_erb__749227865__1013454858' lib/redmine/sudo_mode.rb:63:in `sudo_mode' test/functional/repositories_mercurial_controller_test.rb:416:in `test_diff_should_show_deleted_filenames' bin/rails test test/functional/repositories_mercurial_controller_test.rb:415 ..E Error: RepositoriesMercurialControllerTest#test_diff_latin_1_path: ActionView::Template::Error: undefined method `previous' for nil:NilClass app/views/repositories/diff.html.erb:3:in `_app_views_repositories_diff_html_erb__749227865__1013454858' lib/redmine/sudo_mode.rb:63:in `sudo_mode' test/functional/repositories_mercurial_controller_test.rb:388:in `block (3 levels) in test_diff_latin_1_path' test/functional/repositories_mercurial_controller_test.rb:387:in `each' test/functional/repositories_mercurial_controller_test.rb:387:in `block (2 levels) in test_diff_latin_1_path' test/functional/repositories_mercurial_controller_test.rb:386:in `each' test/functional/repositories_mercurial_controller_test.rb:386:in `block in test_diff_latin_1_path' test/test_helper.rb:93:in `with_settings' test/functional/repositories_mercurial_controller_test.rb:385:in `test_diff_latin_1_path' bin/rails test test/functional/repositories_mercurial_controller_test.rb:384 E Error: RepositoriesMercurialControllerTest#test_diff_should_show_modified_filenames: ActionView::Template::Error: undefined method `previous' for nil:NilClass app/views/repositories/diff.html.erb:3:in `_app_views_repositories_diff_html_erb__749227865__1013454858' lib/redmine/sudo_mode.rb:63:in `sudo_mode' test/functional/repositories_mercurial_controller_test.rb:405:in `test_diff_should_show_modified_filenames' bin/rails test test/functional/repositories_mercurial_controller_test.rb:404 ......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Deprecation warning: Net::LDAP::ConnectionRefused will be deprecated. Use Errno::ECONNREFUSED instead. Deprecation warning: Net::LDAP::ConnectionRefused will be deprecated. Use Errno::ECONNREFUSED instead. ..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E Error: RepositoriesBazaarControllerTest#test_diff: ActionView::Template::Error: undefined method `previous' for nil:NilClass app/views/repositories/diff.html.erb:3:in `_app_views_repositories_diff_html_erb__749227865__1013454858' lib/redmine/sudo_mode.rb:63:in `sudo_mode' test/functional/repositories_bazaar_controller_test.rb:146:in `block in test_diff' test/functional/repositories_bazaar_controller_test.rb:145:in `each' test/functional/repositories_bazaar_controller_test.rb:145:in `test_diff' bin/rails test test/functional/repositories_bazaar_controller_test.rb:143 ................. Finished in 428.714970s, 10.9140 runs/s, 49.5901 assertions/s. 4679 runs, 21260 assertions, 1 failures, 8 errors, 3 skips You have skipped tests. Run with --verbose for details.
Updated by Mizuki ISHIKAWA almost 6 years ago
Go MAEDA wrote:
The patch breaks some tests. Reverted the change.
I'm sorry, I missed the result of the test.
If you add the following code to the patch of #29730#note-2 , the tests should succeed.
diff --git a/app/views/repositories/diff.html.erb b/app/views/repositories/diff.html.erb
index 12875f21ee..3dcc0fdc79 100644
--- a/app/views/repositories/diff.html.erb
+++ b/app/views/repositories/diff.html.erb
@@ -1,3 +1,4 @@
+<% if @changeset && @changeset_to.nil? %>
<div class="contextual">
«
<% unless @changeset.previous.nil? -%>
@@ -25,7 +26,6 @@
<%= submit_tag 'OK', :name => nil %>
<% end %>
</div>
-<% if @changeset && @changeset_to.nil? %>
<%= render :partial => 'changeset' %>
<% else %>
<h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%= @path %></h2>
diff --git a/tmp/test/empty b/tmp/test/empty
deleted file mode 100644
index e69de29bb2..0000000000
Updated by Go MAEDA almost 6 years ago
- Status changed from Reopened to Closed
- Target version deleted (
Candidate for next major release)
Committed the patch again. Thanks.
I don't set the target version of this issue because I think this is a fix for #26576, one of a new feature of Redmine 4.0.0 which is not released yet (no releases are affected by this issue).
Updated by Go MAEDA over 5 years ago
- Has duplicate Feature #8254: Add previous/next functionality in diffs added
Actions