提交 28a95f12 编写于 作者: D Dmitriy Zaporozhets

Merge branch 'restore_wikis' into 'master'

Fix wiki restore

Seems 4a5044e3 only fixed git repos restore. This MR provides the same functionality that was introduced in the aforementioned commit, but for wikis.

See merge request !247
......@@ -2,7 +2,7 @@ v 7.6.0
- Fork repository to groups
- New rugged version
- Add CRON=1 backup setting for quiet backups
-
- Fix failing wiki restore
-
- Add optional Sidekiq MemoryKiller middleware (enabled via SIDEKIQ_MAX_RSS env variable)
-
......
......@@ -79,16 +79,20 @@ module Backup
wiki = ProjectWiki.new(project)
$progress.print " * #{wiki.path_with_namespace} ... "
if File.exists?(path_to_bundle(wiki))
$progress.print " * #{wiki.path_with_namespace} ... "
cmd = %W(git clone --bare #{path_to_bundle(wiki)} #{path_to_repo(wiki)})
if system(*cmd, silent)
$progress.puts " [DONE]".green
else
puts " [FAILED]".red
puts "failed: #{cmd.join(' ')}"
abort 'Restore failed'
end
else
cmd = %W(git init --bare #{path_to_repo(wiki)})
end
if system(*cmd, silent)
$progress.puts " [DONE]".green
else
puts " [FAILED]".red
puts "failed: #{cmd.join(' ')}"
abort 'Restore failed'
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册