cloning.rb revision 9cfb01db247ca04bb4b5b337bbd77c66b7150e53
require 'open3'
else
stdin, stdout, stderr, wait_thr = Open3.popen3 'git', 'clone', '--bare', source, target_path, '--depth', "#{depth}"
end
end
def clone_svn(source, target_path)
target_path = target_path[0..-2] if target_path[-1] == '/'
target_path_svn = target_path_svn_base = "#{target_path}_svn"
else
i = 0
while File.exists? target_path_svn do
target_path_svn = "#{target_path_svn_base}#{i}"
i = i+1
end
stdin, stdout, stderr, wait_thr = Open3.popen3 'git', 'svn', 'clone', '-r', 'HEAD', source, target_path_svn
out = stdout.gets(nil)
err = stderr.gets(nil)
else
end
end
end
end
end