检查 svnversion 结果的 Makefile 规则
尝试制定 makefile 规则来检查 svnversion 是否给出了正确的结果。
通常,它应该返回类似以下内容之一的内容:
1023:1055M
1056
但是,它可能会出现类似错误:
svn: This client is too old to work with working copy '.'; please get a newer Subversion client
因此,这是我基于其他帖子的规则版本:
test2:
@if [ $$(svnversion | sed s/[0-9:M]*//g | grep '.') -neq ""]; \
then \
echo >&2 "Unexpected result from 'svnversion'" \
"of $$(svnversion)"; \
false; \
fi
但是,该条件似乎在两种情况下都会触发。
Trying to make a makefile rule to check that svnversion gave a proper result.
Normally, it should return something like one of the following:
1023:1055M
1056
However, it can get an error like:
svn: This client is too old to work with working copy '.'; please get a newer Subversion client
So here is my version of the rule based on other posts:
test2:
@if [ $(svnversion | sed s/[0-9:M]*//g | grep '.') -neq ""]; \
then \
echo >&2 "Unexpected result from 'svnversion'" \
"of $(svnversion)"; \
false; \
fi
However, the condition seems to trigger on both cases.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您看到的错误表明“svnversion”命令来自另一个次要 Subversion 版本,而不是您用来更新工作副本的客户端。
例如,当您使用基于 Subversion 1.6.6 的 TortoiseSVN 和 Subversion 1.5.6 命令行客户端时,就会发生这种情况。
The error you see tells that the 'svnversion' command is from another minor Subversion version than the client you use to update your working copy.
E.g. This happens when you use a TortoiseSVN based on Subversion 1.6.6 with the Subversion 1.5.6 commandline client.
这是我最终解决这个问题的方法:
Here is how I eventually resolved this: