Xcode 4.2 Can't read stdin: End of file found 配置svn问题

本文详细介绍了在Xcode4上配置SVN服务器的过程,包括如何使用Terminal进行连接、上传文件以建立连接,并提供了解决遇到的问题的方法。特别强调了在没有使用终端会话上传的情况下,无法正确配置SVN服务器的重要性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

网上搜到的:

http://www.ideaex.net/html/Article/2011/08/16/455.html

最近开始搞iphone开发,需要在xcode4上配置svn,查了苹果官方资料,svn服务器(repository)成功connect,也能check out,就是不能创建目录和import东西,报错:“Can't read stdin: End of file found”。

google了问题,找到一个http://stackoverflow.com/questions/5376422/xcode-4-svn-working 奈何还是搞不定;

找了半天,在cocoachina上看到一个相同的,提示用这个方法:http://www.interactivewebs.com/blog/index.php/iphone/xcode-4-with-subversion-svn-servertips/

终于搞定。话说xcode的svn客户端有够差的。

记住:Without the terminal session upload, you will never get it working!

在shell里运行svn import命令时,可能会报错,这是因为没有设置svn编辑器,输入“export SVN_EDITOR=vim”声明系统变量后就能正常运行了。


问题解决了参考http://www.interactivewebs.com/blog/index.php/iphone/xcode-4-with-subversion-svn-servertips/

下面的是原文。

As newly anointed Xcode developers, and now with the release of Xcode 4. We found our team working on trying to get connected to a new subversion (svn) server at the same time we were trying to discover some new features of Xcode 4.

Talk about challenging.

Actually this was the first time with anything Apple we have not had a great experience. Loads of talk etc on the net about what a pain in the bum it all is.

For those who don’t know. Subversion is a code storage system that allows check in / check out of developer Xcode to a server. There are services online that you can pay monthly to for the use of a SVN server. We wanted to host it on one of our own servers.

The setup was not easy and required the setup of a new Linux server, then the setup of the SVN code to turn it into an SVN server.

What became confusing was when we needed to get Xcode to talk to the darn thing. Here is the important things you need to know.

First Contact

Just like the movie from when I was a kid, “First encounter”  is a big deal! Big enough to heap your mashed potato into a big mountain!

1. Open Xcode and select Window / Organiser.

2. Select Repositories

3. Bottom left, click the +

4. Add the details of the SVN server. Like this: svn://www.servername.com/directory (this should be the details for your SVN Server).

5. Where asked for Trunk Branches and Tags (leave empty for now).

 

Now we nee to use the “Terminal” program to make a connection to SVN.

1. Create a test.txt file with some simple message in it. Save it in your documents folder on your mac.

2. Open Terminal

3. Type “svn import /Users/yourname/Documnets/test.txt svn://www.servername.com/directory -m“initial import” --username yourname

Note:

the path “/Users/yourname/Documnets/test.txt” should be a path to any single dummy test.txt file. The idea is that we are uploading a single file to establish a connection.

The: svn://www.servername.com/directory is the path to your SVN server

“initial import” is only a tag line. Not needed

–username yournameusername.  // 双破折号 重点

EG: our code looks like this:

svn import /Users/spascoe/Documents/Temp/test.txt  svn://www.interactivewebs.com/interactivewebs -m “test import”

4. You will be prompted with your existing user for your user password. At this point, if your mac user name does not match the configured SVN user name. Just hit enter. It will then prompt of a user. Type the new SVN user name, then enter. Then the configured SVN pass and enter.

5. You will likely see something that says. “svn://www.servername.com/directory already exists” – Ignore that!

6. Close Xcode

7. Open Xcode again and return to the Optimizer / Repositories and with luck, your server will list on the left hand side, and show the ROOT and any folders on the SVN server.

8. Click back on the server name in the left hand column.

9. Type in the names of the Trunk Branches and Tags folders. We chose to use these names to make it easy. They need to be setup on the SVN server by the administrator. They ARE case sensitive.

10. The text.txt file can be deleted from the server through Xcode if desired.

11. Close the terminal session.

Thoughts

Sometimes not all views refresh correctly. We suggest closing Xcode and opening it again to get things visible that you know should be there.

If you need to change user names, and or passwords. Then you will need to enter the terminal again and upload something using the method above.

We don’t understand exactly why, but it appears that Xcode will remember the authentication of the terminal session, and caches the authentication properties some place. Without the terminal session upload, you will never get it working!






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值