From 83e45cad9f6a566147fdb4d05d1d6a0a7bfad98e 2012-01-20 19:46:28 From: Jean-Philippe Lang Date: 2012-01-20 19:46:28 Subject: [PATCH] Fixed: Git: Mercurial: Branch dropdown broken on repositories page (#10026). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8678 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/repositories/_navigation.html.erb b/app/views/repositories/_navigation.html.erb index 1776d2b..ba38fed 100644 --- a/app/views/repositories/_navigation.html.erb +++ b/app/views/repositories/_navigation.html.erb @@ -10,7 +10,7 @@ :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), - :rev => ''}, + :rev => nil}, {:method => :get, :id => 'revision_selector'}) do -%> <% if !@repository.branches.nil? && @repository.branches.length > 0 -%> diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb index 2792a3f..9218b4c 100644 --- a/test/functional/repositories_mercurial_controller_test.rb +++ b/test/functional/repositories_mercurial_controller_test.rb @@ -163,6 +163,16 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase end end + def show_should_show_branch_selection_form + @repository.fetch_changesets + @project.reload + get :show, :id => PRJ_ID + assert_tag 'form', :attributes => {:id => 'revision_selector', :action => '/projects/subproject1/repository/show'} + assert_tag 'select', :attributes => {:name => 'branch'}, + :child => {:tag => 'option', :attributes => {:value => 'test-branch-01'}}, + :parent => {:tag => 'form', :attributes => {:id => 'revision_selector'}} + end + def test_show_branch assert_equal 0, @repository.changesets.count @repository.fetch_changesets