OSDN Git Service

Merge branch '6-1-stable'
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Wed, 25 Sep 2013 15:34:50 +0000 (18:34 +0300)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Wed, 25 Sep 2013 15:34:50 +0000 (18:34 +0300)
Conflicts:
lib/tasks/gitlab/check.rake

1  2 
lib/tasks/gitlab/check.rake

@@@ -553,23 -553,32 +554,49 @@@ namespace :gitlab d
        end
      end
  
 +    def check_gitlab_shell_self_test
 +      gitlab_shell_repo_base = File.expand_path('gitlab-shell', gitlab_shell_user_home)
 +      check_cmd = File.expand_path('bin/check', gitlab_shell_repo_base)
 +      puts "Running #{check_cmd}"
 +      if system(check_cmd, chdir: gitlab_shell_repo_base)
 +        puts 'gitlab-shell self-check successful'.green
 +      else
 +        puts 'gitlab-shell self-check failed'.red
 +        try_fixing_it(
 +          'Make sure GitLab is running;',
 +          'Check the gitlab-shell configuration file:',
 +          sudo_gitlab("editor #{File.expand_path('config.yml', gitlab_shell_repo_base)}")
 +        )
 +        fix_and_rerun
 +      end
 +    end
 +
+     def check_projects_have_namespace
+       print "projects have namespace: ... "
+       unless Project.count > 0
+         puts "can't check, you have no projects".magenta
+         return
+       end
+       puts ""
+       Project.find_each(batch_size: 100) do |project|
+         print "#{project.name_with_namespace.yellow} ... "
+         if project.namespace
+           puts "yes".green
+         else
+           puts "no".red
+           try_fixing_it(
+             "Migrate global projects"
+           )
+           for_more_information(
+             "doc/update/5.4-to-6.0.md in section \"#global-projects\""
+           )
+           fix_and_rerun
+         end
+       end
+     end
  
      # Helper methods
      ########################