Xcode:错误 -> 构建失败 -> 请升级您的 Subversion 客户端以使用此工作副本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8268505/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode: Error -> Build failed -> Please upgrade your Subversion client to use this working copy
提问by Tim
I am using Xcode 4.2.1. and I have this problem running an existing application on the iOS simulator:
我正在使用 Xcode 4.2.1。我在 iOS 模拟器上运行现有应用程序时遇到了这个问题:
svn: The path '.' appears to be part of a Subversion 1.7 or greater
working copy. Please upgrade your Subversion client to use this
working copy.
/Users/me/Library/Developer/Xcode/DerivedData/myproject-dxfzldckuqdmlrghowwkdrbgoigy/Build /Intermediates/myproject.build/Debug-iphonesimulator/MyProject.build/Script-9567AEA113C59633000AA291.sh: No Subversion revision found at /Users/me/Library/Developer/Xcode/DerivedData/myproject-dxfzldckuqdmlrghowwkdrbgoigy/Build/Intermediates/myproject.build/Debug-iphonesimulator/MyProject.build/Script-9567AEA113C59633000AA291.sh line 32.
Building revision
Command /bin/sh failed with exit code 1
I have a Subversion server 1.7.1 installed and also on the client side I upgraded to 1.7.1.
I did a svn upgrade
and then I get this error in Xcode.
我安装了 Subversion 服务器 1.7.1,也在客户端升级到 1.7.1。我做了一个svn upgrade
,然后我在 Xcode 中收到了这个错误。
If I repeat the svn upgrade
on the terminal I get the message Can't upgrade '...' as it is not a pre-1.7 working copy directory
.
如果我svn upgrade
在终端上重复 ,我会收到消息Can't upgrade '...' as it is not a pre-1.7 working copy directory
。
So what is wrong? How an I solve the problem?
那么有什么问题呢?我如何解决问题?
Best Regards Tim
最好的问候蒂姆
回答by pendor
Xcode doesn't yet support SVN 1.7. Only 1.6 is supported. In order to fix your problem, you'll need to switch to using an SVN 1.6 compatible working copy.
Xcode 尚不支持 SVN 1.7。仅支持 1.6。为了解决您的问题,您需要切换到使用 SVN 1.6 兼容的工作副本。
Since SVN 1.7 client is unable to work with 1.6 working copies at all, you'll need to remove SVN 1.7.x from your client and revert to 1.6. (Or perhaps just adjust your PATH so the SVN 1.6 tools are first.) Once 1.6 is back, delete or move aside your existing working copy and check out a fresh copy with SVN 1.6. Now Xcode should be able to work with your working copy.
由于 SVN 1.7 客户端根本无法使用 1.6 工作副本,因此您需要从客户端中删除 SVN 1.7.x 并恢复到 1.6。(或者可能只是调整您的 PATH 以便首先使用 SVN 1.6 工具。)一旦 1.6 回来,删除或移开您现有的工作副本并使用 SVN 1.6 签出新副本。现在 Xcode 应该能够处理您的工作副本了。
Note that you can freely use SVN 1.6 client with an SVN 1.7 server. Some of the newer features won't be available, but it will work. There's no need to downgrade the server or your server-side repositories.
请注意,您可以在 SVN 1.7 服务器上自由使用 SVN 1.6 客户端。一些较新的功能将不可用,但它会起作用。无需降级服务器或服务器端存储库。
Keep an eye on the Xcode release notes in updates as I'm sure Apple will note when Xcode is capable of using SVN 1.7. When a 1.7 compatible release of Xcode becomes available, it should then be safe to upgrade your client to 1.7 and migrate your working copy again.
请密切关注更新中的 Xcode 发行说明,因为我相信 Apple 会注意到 Xcode 何时能够使用 SVN 1.7。当 Xcode 的 1.7 兼容版本可用时,将您的客户端升级到 1.7 并再次迁移您的工作副本应该是安全的。
回答by dasblinkenlight
There is a post that appears to imply that you can fool XCode into using svn 1.7 client by changing your PATH and setting up a couple of soft links in strategic places. Unfortunately, the postis in Chinese. Fortunately, Google translateand the presence of UNIX commands make it possible to decrypt what the post is saying. I will try it in the next few days, and update the answer if anything useful comes out of this exercise.
有一篇帖子似乎暗示您可以通过更改 PATH 并在重要位置设置几个软链接来欺骗 XCode 使用 svn 1.7 客户端。不幸的是,帖子是中文的。幸运的是,谷歌翻译和 UNIX 命令的存在使得解密帖子内容成为可能。我会在接下来的几天内尝试一下,如果这个练习有任何有用的东西,我会更新答案。
EDIT: I tried the steps from the post, and it worked. Here is what I did:
编辑:我尝试了帖子中的步骤,并且奏效了。这是我所做的:
- Downloaded and installed svn client 1.7.2 into
/opt/subversion
- Added /opt/subversion/bin to my
PATH
in.bash_profile
- Created a backup directory
/Developer/usr/bin/orig.svn
- Moved
/Developer/usr/bin/svn*
to/Developer/usr/bin/orig.svn
- Ran
ln -s /opt/subversion/bin/svn* /Developer/usr/bin/
- 下载并安装svn client 1.7.2到
/opt/subversion
- 将 /opt/subversion/bin 添加到我的输入
PATH
中.bash_profile
- 创建备份目录
/Developer/usr/bin/orig.svn
- 移动
/Developer/usr/bin/svn*
到/Developer/usr/bin/orig.svn
- 冉
ln -s /opt/subversion/bin/svn* /Developer/usr/bin/
After that I re-started XCode, went to Organizer, and was able to attach a working copy of a checkout created with svn 1.7.2 client. Organizer showed a green dot next to the repository, displayed a list of revisions, etc., so at this point I believe that the trick has worked.
之后,我重新启动 XCode,转到 Organizer,并且能够附加使用 svn 1.7.2 客户端创建的结帐的工作副本。组织者在存储库旁边显示了一个绿点,显示了修订列表等,所以在这一点上我相信这个技巧已经奏效。
回答by Chris Hanson
You can download and install a binary package from http://www.wandisco.com/subversion/download#osx
您可以从http://www.wandisco.com/subversion/download#osx下载并安装二进制包
The package will install to /opt/subversion
while the xcode version of SVN is installed in /usr/bin
. If you prepend/opt/subversion/bin
to your path variable, it will be chosen instead of the xcode version.
该软件包将安装/opt/subversion
而SVN的版本的Xcode中安装/usr/bin
。如果你在你的路径变量前面加上/opt/subversion/bin
它,它将被选择而不是 xcode 版本。
If you don't want to mess with your path, you can just alias one version or the other. man alias
for details.
如果你不想弄乱你的路径,你可以只为一个版本或另一个版本起别名。man alias
详情。