我正在尝试使用 ruby 将一些文件上传到 svn 存储库。但是在签出之后,其余的代码并没有被执行。
r = SvnRepository.new("#{repDir}")
r.checkout("", ".", user, pass)
puts "NOT EXECUTING!"
`cp -r #{compFold} ./trunk/#{compFold}`
r.add("trunk", "./#{compFold}")
r.commit("trunk", "Component #{compFold} uploaded", user, pass)
r.checkout 代码:
def checkout(repository, working_copy_path, user = nil, pass = nil)
#result = `cd #{working_copy_path} && #{@svn} co file:///#{@repository_base}/#{repository}`
check = "cd #{working_copy_path} && #{@svn} co #{@repository_base}/#{repository}"
if user != nil
check = check + " --username #{user}"
if pass != nil
check = check + " --password #{pass}"
end
end
result = exec(check)
result[/d+/]
end