Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
fac50387
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fac50387
编写于
2月 01, 2013
作者:
R
Riyad Preukschas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Port changes from #2803
上级
42dd006d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
47 addition
and
38 deletion
+47
-38
lib/tasks/gitlab/check.rake
lib/tasks/gitlab/check.rake
+47
-38
未找到文件。
lib/tasks/gitlab/check.rake
浏览文件 @
fac50387
...
@@ -782,21 +782,25 @@ namespace :gitlab do
...
@@ -782,21 +782,25 @@ namespace :gitlab do
Project
.
find_each
(
batch_size:
100
)
do
|
project
|
Project
.
find_each
(
batch_size:
100
)
do
|
project
|
print
"
#{
project
.
name_with_namespace
.
yellow
}
... "
print
"
#{
project
.
name_with_namespace
.
yellow
}
... "
correct_options
=
options
.
map
do
|
name
,
value
|
if
project
.
empty_repo?
run
(
"git --git-dir=
\"
#{
project
.
repository
.
path_to_repo
}
\"
config --get
#{
name
}
"
).
try
(
:chomp
)
==
value
puts
"repository is empty"
.
magenta
end
if
correct_options
.
all?
puts
"ok"
.
green
else
else
puts
"wrong or missing"
.
red
correct_options
=
options
.
map
do
|
name
,
value
|
try_fixing_it
(
run
(
"git --git-dir=
\"
#{
project
.
repository
.
path_to_repo
}
\"
config --get
#{
name
}
"
).
try
(
:chomp
)
==
value
sudo_gitlab
(
"bundle exec rake gitlab:gitolite:update_repos RAILS_ENV=production"
)
end
)
for_more_information
(
if
correct_options
.
all?
"doc/raketasks/maintenance.md"
puts
"ok"
.
green
)
else
fix_and_rerun
puts
"wrong or missing"
.
red
try_fixing_it
(
sudo_gitlab
(
"bundle exec rake gitlab:gitolite:update_repos RAILS_ENV=production"
)
)
for_more_information
(
"doc/raketasks/maintenance.md"
)
fix_and_rerun
end
end
end
end
end
end
end
...
@@ -822,32 +826,37 @@ namespace :gitlab do
...
@@ -822,32 +826,37 @@ namespace :gitlab do
Project
.
find_each
(
batch_size:
100
)
do
|
project
|
Project
.
find_each
(
batch_size:
100
)
do
|
project
|
print
"
#{
project
.
name_with_namespace
.
yellow
}
... "
print
"
#{
project
.
name_with_namespace
.
yellow
}
... "
project_hook_file
=
File
.
join
(
project
.
repository
.
path_to_repo
,
"hooks"
,
hook_file
)
unless
File
.
exists?
(
project_hook_file
)
if
project
.
empty_repo?
puts
"missing"
.
red
puts
"repository is empty"
.
magenta
try_fixing_it
(
"sudo -u
#{
gitolite_ssh_user
}
ln -sf
#{
gitolite_hook_file
}
#{
project_hook_file
}
"
)
for_more_information
(
"lib/support/rewrite-hooks.sh"
)
fix_and_rerun
next
end
if
File
.
lstat
(
project_hook_file
).
symlink?
&&
File
.
realpath
(
project_hook_file
)
==
File
.
realpath
(
gitolite_hook_file
)
puts
"ok"
.
green
else
else
puts
"not a link to Gitolite's hook"
.
red
project_hook_file
=
File
.
join
(
project
.
repository
.
path_to_repo
,
"hooks"
,
hook_file
)
try_fixing_it
(
"sudo -u
#{
gitolite_ssh_user
}
ln -sf
#{
gitolite_hook_file
}
#{
project_hook_file
}
"
unless
File
.
exists?
(
project_hook_file
)
)
puts
"missing"
.
red
for_more_information
(
try_fixing_it
(
"lib/support/rewrite-hooks.sh"
"sudo -u
#{
gitolite_ssh_user
}
ln -sf
#{
gitolite_hook_file
}
#{
project_hook_file
}
"
)
)
fix_and_rerun
for_more_information
(
"lib/support/rewrite-hooks.sh"
)
fix_and_rerun
next
end
if
File
.
lstat
(
project_hook_file
).
symlink?
&&
File
.
realpath
(
project_hook_file
)
==
File
.
realpath
(
gitolite_hook_file
)
puts
"ok"
.
green
else
puts
"not a link to Gitolite's hook"
.
red
try_fixing_it
(
"sudo -u
#{
gitolite_ssh_user
}
ln -sf
#{
gitolite_hook_file
}
#{
project_hook_file
}
"
)
for_more_information
(
"lib/support/rewrite-hooks.sh"
)
fix_and_rerun
end
end
end
end
end
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录