Create a cross-repo merge requests produces an error 500 in Gitlab 6.0
Created by: lrmunoz
In one of our repositories, when creating a merge request from a forked repository to the original repository, produces an error 500 just after pressing submit. It doesn't happen for the rest of our repositories. The logfile shows the following:
Started POST "/luis.munoz/lhs/merge_requests" for 127.0.0.1 at 2013-09-13 07:32:26 +0000
Processing by Projects::MergeRequestsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"xxxxx9AY/r444H40fZ3c+EZdnUqXczeHOJceqGjk3Tk=", "merge_request"=>{"source_project_id"=>"17", "source_branch"=>"4063-luis-autopubli
sh-failure-email", "target_project_id"=>"2", "target_branch"=>"4063-luis-autopublish-failure-email", "title"=>"4063 Luis Autopublish Failure Email", "assignee_id"=>"2", "milestone_
id"=>""}, "project_id"=>"luis.munoz/lhs"}
Completed 500 Internal Server Error in 369ms
NoMethodError (undefined method `any?' for false:FalseClass):
app/models/merge_request.rb:184:in `reloaded_commits'
app/models/merge_request.rb:118:in `reload_code'
app/controllers/projects/merge_requests_controller.rb:64:in `create'
Output of checks seems correct:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...
Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 1.7.0 ? ... OK (1.7.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ...
Company / LHS ... ok
Luis Muñoz / LHS ... ok
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Checking Sidekiq ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
Projects have satellites? ...
Company / LHS ... yes
Luis Muñoz / LHS ... yes
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.8.3)
Checking GitLab ... Finished
This is my setup:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System: Ubuntu 12.04
Current User: git
Using RVM: no
Ruby Version: 1.9.3p392
Gem Version: 1.8.23
Bundler Version:1.3.5
Rake Version: 10.1.0
GitLab information
Version: 6.0.2
Revision: 87ee403
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: https://company.com:8080
HTTP Clone URL: https://company.com:8080/some-project.git
SSH Clone URL: [email protected]:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.7.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git