diff options
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 4 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | app/controllers/groups_controller.rb | 1 | ||||
-rw-r--r-- | app/mailers/emails/issues.rb | 8 | ||||
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 8 | ||||
-rw-r--r-- | app/models/project.rb | 1 | ||||
-rw-r--r-- | app/services/project_transfer_service.rb | 3 | ||||
-rw-r--r-- | app/views/projects/milestones/show.html.haml | 5 | ||||
-rw-r--r-- | config/unicorn.rb.example | 28 | ||||
-rw-r--r-- | db/migrate/20130419190306_allow_merges_for_forks.rb | 3 | ||||
-rw-r--r-- | doc/update/5.4-to-6.0.md | 2 | ||||
-rw-r--r-- | lib/support/init.d/gitlab | 2 | ||||
-rw-r--r-- | lib/tasks/gitlab/info.rake | 2 | ||||
-rw-r--r-- | spec/mailers/notify_spec.rb | 10 |
15 files changed, 45 insertions, 36 deletions
@@ -23,7 +23,7 @@ gem 'omniauth-github' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '2.1.0' +gem "gitlab_git", '2.1.1' # Ruby/Rack Git Smart-HTTP Server Handler gem 'gitlab-grack', '~> 1.0.1', require: 'grack' diff --git a/Gemfile.lock b/Gemfile.lock index abec9243bce..e345c40f445 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -186,7 +186,7 @@ GEM gitlab-pygments.rb (0.3.2) posix-spawn (~> 0.3.6) yajl-ruby (~> 1.1.0) - gitlab_git (2.1.0) + gitlab_git (2.1.1) activesupport (~> 3.2.13) github-linguist (~> 2.3.4) gitlab-grit (~> 2.6.0) @@ -576,7 +576,7 @@ DEPENDENCIES gitlab-gollum-lib (~> 1.0.1) gitlab-grack (~> 1.0.1) gitlab-pygments.rb (~> 0.3.2) - gitlab_git (= 2.1.0) + gitlab_git (= 2.1.1) gitlab_meta (= 6.0) gitlab_omniauth-ldap (= 1.0.3) gon diff --git a/README.md b/README.md index d4c7c2740e4..19e7cbaad68 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ * powered by Ruby on Rails * completely free and open source (MIT license) -* used by more than 10.000 organizations to keep their code secure +* used by more than 25.000 organizations to keep their code secure ### Code status diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 1190dd40b73..60fc3f6b551 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -87,7 +87,6 @@ class GroupsController < ApplicationController end def destroy - @group.truncate_teams @group.destroy redirect_to root_path, notice: 'Group was removed.' diff --git a/app/mailers/emails/issues.rb b/app/mailers/emails/issues.rb index c1112a98f92..6eda88c7921 100644 --- a/app/mailers/emails/issues.rb +++ b/app/mailers/emails/issues.rb @@ -3,14 +3,14 @@ module Emails def new_issue_email(recipient_id, issue_id) @issue = Issue.find(issue_id) @project = @issue.project - mail(to: recipient(recipient_id), subject: subject("new issue ##{@issue.id}", @issue.title)) + mail(to: recipient(recipient_id), subject: subject("new issue ##{@issue.iid}", @issue.title)) end def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id) @issue = Issue.find(issue_id) @previous_assignee = User.find_by_id(previous_assignee_id) if previous_assignee_id @project = @issue.project - mail(to: recipient(recipient_id), subject: subject("changed issue ##{@issue.id}", @issue.title)) + mail(to: recipient(recipient_id), subject: subject("changed issue ##{@issue.iid}", @issue.title)) end def closed_issue_email(recipient_id, issue_id, updated_by_user_id) @@ -18,7 +18,7 @@ module Emails @project = @issue.project @updated_by = User.find updated_by_user_id mail(to: recipient(recipient_id), - subject: subject("Closed issue ##{@issue.id}", @issue.title)) + subject: subject("Closed issue ##{@issue.iid}", @issue.title)) end def issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id) @@ -27,7 +27,7 @@ module Emails @project = @issue.project @updated_by = User.find updated_by_user_id mail(to: recipient(recipient_id), - subject: subject("changed issue ##{@issue.id}", @issue.title)) + subject: subject("changed issue ##{@issue.iid}", @issue.title)) end end end diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index cf6950966e1..57c1925fa47 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -2,24 +2,24 @@ module Emails module MergeRequests def new_merge_request_email(recipient_id, merge_request_id) @merge_request = MergeRequest.find(merge_request_id) - mail(to: recipient(recipient_id), subject: subject("new merge request !#{@merge_request.id}", @merge_request.title)) + mail(to: recipient(recipient_id), subject: subject("new merge request !#{@merge_request.iid}", @merge_request.title)) end def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id) @merge_request = MergeRequest.find(merge_request_id) @previous_assignee = User.find_by_id(previous_assignee_id) if previous_assignee_id - mail(to: recipient(recipient_id), subject: subject("changed merge request !#{@merge_request.id}", @merge_request.title)) + mail(to: recipient(recipient_id), subject: subject("changed merge request !#{@merge_request.iid}", @merge_request.title)) end def closed_merge_request_email(recipient_id, merge_request_id, updated_by_user_id) @merge_request = MergeRequest.find(merge_request_id) @updated_by = User.find updated_by_user_id - mail(to: recipient(recipient_id), subject: subject("Closed merge request !#{@merge_request.id}", @merge_request.title)) + mail(to: recipient(recipient_id), subject: subject("Closed merge request !#{@merge_request.iid}", @merge_request.title)) end def merged_merge_request_email(recipient_id, merge_request_id) @merge_request = MergeRequest.find(merge_request_id) - mail(to: recipient(recipient_id), subject: subject("Accepted merge request !#{@merge_request.id}", @merge_request.title)) + mail(to: recipient(recipient_id), subject: subject("Accepted merge request !#{@merge_request.iid}", @merge_request.title)) end end diff --git a/app/models/project.rb b/app/models/project.rb index b1b7634233c..b505ffb58cf 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -421,6 +421,7 @@ class Project < ActiveRecord::Base begin gitlab_shell.mv_repository("#{old_path_with_namespace}.wiki", "#{new_path_with_namespace}.wiki") gitlab_shell.rm_satellites(old_path_with_namespace) + ensure_satellite_exists send_move_instructions rescue # Returning false does not rollback after_* transaction but gives diff --git a/app/services/project_transfer_service.rb b/app/services/project_transfer_service.rb index 3b8c4847f20..8fbf92ff20a 100644 --- a/app/services/project_transfer_service.rb +++ b/app/services/project_transfer_service.rb @@ -29,6 +29,9 @@ class ProjectTransferService # Move wiki repo also if present gitlab_shell.mv_repository("#{old_path}.wiki", "#{new_path}.wiki") + # create satellite repo + project.ensure_satellite_exists + true end end diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 8a5c2a938b1..b755a813419 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -8,7 +8,10 @@ = link_to edit_project_milestone_path(@project, @milestone), class: "btn grouped" do %i.icon-edit Edit - = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove" + - if @milestone.active? + = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove" + - else + = link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn" - if @milestone.issues.any? && @milestone.can_be_closed? .alert.alert-success diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example index e010de6d6a9..812fd5b7449 100644 --- a/config/unicorn.rb.example +++ b/config/unicorn.rb.example @@ -26,7 +26,7 @@ working_directory "/home/git/gitlab" # available in 0.94.0+ # listen on both a Unix domain socket and a TCP port, # we use a shorter backlog for quicker failover when busy listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 64 -listen 8080, :tcp_nopush => true +listen "127.0.0.1:8080", :tcp_nopush => true # nuke workers after 30 seconds instead of 60 seconds (the default) timeout 30 @@ -64,19 +64,19 @@ before_fork do |server, worker| # installations. It is not needed if your system can house # twice as many worker_processes as you have configured. # - # # This allows a new master process to incrementally - # # phase out the old master process with SIGTTOU to avoid a - # # thundering herd (especially in the "preload_app false" case) - # # when doing a transparent upgrade. The last worker spawned - # # will then kill off the old master process with a SIGQUIT. - # old_pid = "#{server.config[:pid]}.oldbin" - # if old_pid != server.pid - # begin - # sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU - # Process.kill(sig, File.read(old_pid).to_i) - # rescue Errno::ENOENT, Errno::ESRCH - # end - # end + # This allows a new master process to incrementally + # phase out the old master process with SIGTTOU to avoid a + # thundering herd (especially in the "preload_app false" case) + # when doing a transparent upgrade. The last worker spawned + # will then kill off the old master process with a SIGQUIT. + old_pid = "#{server.config[:pid]}.oldbin" + if old_pid != server.pid + begin + sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU + Process.kill(sig, File.read(old_pid).to_i) + rescue Errno::ENOENT, Errno::ESRCH + end + end # # Throttle the master from forking too quickly by sleeping. Due # to the implementation of standard Unix signal handlers, this diff --git a/db/migrate/20130419190306_allow_merges_for_forks.rb b/db/migrate/20130419190306_allow_merges_for_forks.rb index 691293a1c3e..56ce58a846d 100644 --- a/db/migrate/20130419190306_allow_merges_for_forks.rb +++ b/db/migrate/20130419190306_allow_merges_for_forks.rb @@ -1,7 +1,8 @@ class AllowMergesForForks < ActiveRecord::Migration def self.up - add_column :merge_requests, :target_project_id, :integer, :null => false + add_column :merge_requests, :target_project_id, :integer, :null => true MergeRequest.update_all("target_project_id = project_id") + change_column :merge_requests, :target_project_id, :integer, :null => false rename_column :merge_requests, :project_id, :source_project_id end diff --git a/doc/update/5.4-to-6.0.md b/doc/update/5.4-to-6.0.md index 23993d05535..7fe57a8ff3f 100644 --- a/doc/update/5.4-to-6.0.md +++ b/doc/update/5.4-to-6.0.md @@ -71,6 +71,8 @@ sudo -u git -H bundle exec rake migrate_global_projects RAILS_ENV=production sudo -u git -H bundle exec rake migrate_keys RAILS_ENV=production sudo -u git -H bundle exec rake migrate_inline_notes RAILS_ENV=production +sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production + ``` ### 6. Update config files diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab index 29c9d98965d..6f97643f9e0 100644 --- a/lib/support/init.d/gitlab +++ b/lib/support/init.d/gitlab @@ -81,7 +81,7 @@ restart() { if [ "$PID" -ne 0 -a "$STATUS" -ne 0 ]; then echo "Restarting $DESC..." kill -USR2 `cat $WEB_SERVER_PID` - execute "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &" + execute "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1" if [ `whoami` = root ]; then execute "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &" fi diff --git a/lib/tasks/gitlab/info.rake b/lib/tasks/gitlab/info.rake index 091de6ee6d5..ea83efcd887 100644 --- a/lib/tasks/gitlab/info.rake +++ b/lib/tasks/gitlab/info.rake @@ -54,7 +54,7 @@ namespace :gitlab do # check Gitolite version - gitlab_shell_version_file = "#{Gitlab.config.gitlab_shell.repos_path}/../gitlab-shell/VERSION" + gitlab_shell_version_file = "#{Gitlab.config.gitlab_shell.hooks_path}/../VERSION" if File.readable?(gitlab_shell_version_file) gitlab_shell_version = File.read(gitlab_shell_version_file) end diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index a91bc9d75ad..7d6647e0983 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -110,7 +110,7 @@ describe Notify do it_behaves_like 'an assignee email' it 'has the correct subject' do - should have_subject /#{project.name} \| new issue ##{issue.id} \| #{issue.title}/ + should have_subject /#{project.name} \| new issue ##{issue.iid} \| #{issue.title}/ end it 'contains a link to the new issue' do @@ -126,7 +126,7 @@ describe Notify do it_behaves_like 'a multiple recipients email' it 'has the correct subject' do - should have_subject /changed issue ##{issue.id} \| #{issue.title}/ + should have_subject /changed issue ##{issue.iid} \| #{issue.title}/ end it 'contains the name of the previous assignee' do @@ -148,7 +148,7 @@ describe Notify do subject { Notify.issue_status_changed_email(recipient.id, issue.id, status, current_user) } it 'has the correct subject' do - should have_subject /changed issue ##{issue.id} \| #{issue.title}/i + should have_subject /changed issue ##{issue.iid} \| #{issue.title}/i end it 'contains the new status' do @@ -175,7 +175,7 @@ describe Notify do it_behaves_like 'an assignee email' it 'has the correct subject' do - should have_subject /new merge request !#{merge_request.id}/ + should have_subject /new merge request !#{merge_request.iid}/ end it 'contains a link to the new merge request' do @@ -199,7 +199,7 @@ describe Notify do it_behaves_like 'a multiple recipients email' it 'has the correct subject' do - should have_subject /changed merge request !#{merge_request.id}/ + should have_subject /changed merge request !#{merge_request.iid}/ end it 'contains the name of the previous assignee' do |