Project

General

Profile

Feature #39238 ยป 0001-Redirect-to-repositories-show-after-repository-fetch.patch

Holger Just, 2023-10-25 16:33

View differences:

app/controllers/repositories_controller.rb
103 103

  
104 104
  def fetch_changesets
105 105
    @repository.fetch_changesets if @project.active? && @path.empty? && !Setting.autofetch_changesets?
106
    show
106

  
107
    redirect_to(
108
      controller: :repositories, action: :show,
109
      id: @project, repository_id: @repository.identifier_param
110
    )
107 111
  end
108 112

  
109 113
  def changes
test/functional/repositories_controller_test.rb
237 237
      role.add_permission! :manage_repository
238 238
      Repository::Subversion.any_instance.expects(:fetch_changesets).once
239 239
      post(:fetch_changesets, :params => {:id => 1, :repository_id => 10})
240
      assert_response :success
240
      assert_redirected_to '/projects/ecookbook/repository/10'
241 241

  
242 242
      role.remove_permission! :manage_repository
243 243
      Repository::Subversion.any_instance.expects(:fetch_changesets).never
    (1-1/1)