如何确定“svn up"是否成功完成? [英] How to find out if 'svn up' finished successfully?

查看:72
本文介绍了如何确定“svn up"是否成功完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行 sudo svn --username radek update ".$codebase".--force"; 每天晚上自动化测试开始前从我的 php 脚本(在 SuSE 上).所以测试是在今天签入的最新代码上完成的.

I run sudo svn --username radek update ".$codebase." --force"; from my php script (on SuSE) every night before automation testing starts. So the testing is done on the latest code that was checked in today.

我如何确定svn up 已成功完成?那么,万一不是测试没有被触发?

How can I for sure know that svn up finished successfully? So in case it wasn't the testing is not triggered?

推荐答案

从命令行,我通常运行 svn status -q 如果一切都是最新的,它应该不打印任何内容.否则,它要么出错,要么显示尚未更新的文件.

From the command line, I usually run svn status -q which should print nothing if everything is up to date. Otherwise, it will either error out, or display what files haven't been updated yet.

正如其他人所提到的,如果 svn up 由于任何特定原因失败,它应该返回一个非零值.

As others have mentioned, svn up should return a non-zero value if it failed for any particular reason.

您应该考虑使用像 Jenkins 这样的持续构建系统.您可以让 Jenkins 在每次提交时运行您的测试,或者在一天中的特定时间自动运行它.这样,您就不会重新发明轮子.此外,Jenkins 可以通过电子邮件发送测试结果,并为您提供一个展示它们的地方.

You should look into using a continuous build system like Jenkins. You could have Jenkins run your tests with every commit, or automatically have it run at a particular time during the day. This way, you're not reinventing the wheel. Plus, Jenkins could email the test results and give you a place to display them.

这篇关于如何确定“svn up"是否成功完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆