开发者

Howto determine if an SVN working copy needs updating (from a script)?

I'd like to determine from a batch file on Windows if a local SVN working copy needs to be updated from the server. On a unix-like machine, I would run "svn status -u" and count the '*'s. How do I achieve the same thing in a batch file?

Background: I'm trying to determine if a dependency library is out-of-date since it takes a long time to re-build it and we only update it about once every 3 months. This is for an automated开发者_如何学编程 build process.


If I'm following you, maybe something like:

svn st -u | find "*"
if not "%errorlevel%"=="0" goto end

svn update

:end

find sets errorlevel to 0 if it successfully found "*".

EDIT: accidentally left off the "" around %errorlevel%.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜