Hello, I guess I found a regression in Gitorious 2.2.
*What I did:* I'm using Gitorious 2.2 with multiple repository clones. I would like to create a merge request from one repository to another. In the source repository I call "Request merge" and a page which contains drop-downs for target repository, target branch and source branch is shown. All three drop-downs are preselected with values. I now change the target repository because I need another one than the default. *What happened:* The drop-down target branches is empty. *What I expected:* In previous versions of Gitorious (possibly 2.0) the drop-down with target branches was refreshed depending on the selected target repository. Instead of being empty it showed the branches of the target repository. This no longer works. *Note:* even if the target repository which was preselected is selected again the list of target branches will remain empty *A first analysis:* When changing the drop-down target repository according to Firebug the following POSTS are sent: http://git/project/my-project/merge_requests/target_branches http://git/project/my-project/merge_requests/commit_list Both return with code 200 (OK), but the first POST returns an empty list (there are no option elements in the select element): <p> <label for="merge_request_target_branch">Target Branch</label><br /> <small class="hint">The target branch you wish your changes to be merged into</small><br /> <select id="merge_request_target_branch" name="merge_request[target_branch]"></select> </p> However, I have no idea why the request returns an empty list of target branches. Can someone confirm this as a bug? What information is needed to get this fixed? I've been looking in the code and traced the list creation down to http://gitorious.org/gitorious/mainline/blobs/master/app/views/merge_requests/_target_branches.html.erb but I don't know where the collection "target_branches" is being created and why it is empty. btw, the following temporary hack leads to a JavaScript error if the list of commits is empty and therefore there is no radio button with the index 0: <!-- Note: Temporary hack ahead, remove during merge request page redesign. Having to select a range of commits is mandatory but not checked by default and not obvious to users. The merge request page needs overall redesign, until then we'll just select the whole commit by default after the commit-list table has finished rendering and initalizing. --> <script> var selectFirstCommitRadioBtn = function(){ $("#commit_table").find("input[type=radio]")[0].click(); }; setTimeout(selectFirstCommitRadioBtn,1000); </script> Regards Tobias -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected]
