使用 Xcode 和 SVN (Subversion) 设置 SCM
我正在尝试使用网络磁盘(已安装)上的 Subversion (SVN) 设置 Xcode SCM。我能够在本地计算机上设置 SVN 存储库,一切都顺利进行,没有任何麻烦。 参考文章:Jeff LaMarche 的版本控制是您的朋友< /a>
我的问题是我无法在网络驱动器(已安装)上设置 SVN。
cd [mounted_drive]/Users/Shared
mkdir subversion
cd subversion
mkdir HelloWorld
svnadmin create HelloWorld
chmod -R 777 HelloWorld
上面的命令工作正常并且主颠覆存储库已成功创建。问题是它不允许我在主 SVN 存储库中创建子文件夹(主干、分支和标签)。
svn mkdir
file:///[mounted_drive]/Users/Shared/Subversion/HelloWorld/trunk
file:///[mounted_drive]/Users/Shared/Subversion/HelloWorld/branch
file:///[mounted_drive]/Users/Shared/Subversion/HelloWorld/tag
当我尝试运行上面的 svn mkdir 命令时,出现以下 svn 错误:
“svn:无法获得文件的独占锁定 '[mounted_drive]/[subversion_repository_directory]/db/write-lock':不支持操作”
如果我控制远程计算机,并本机运行上述命令,它会工作并创建 trunk、branch 和 tag 目录。
设置 Xcode 后SCM 到远程存储库,如果我尝试将代码“导入”到此存储库(远程),Xcode 将返回以下错误:
“svn:无法获得文件的独占锁定 '[mounted_drive]/[subversion_repository_directory]/db/transactions/3-1.txvn/rev-lock':不支持操作”
整个故事的关键:我在网络上设置 SVN 时遇到了很多问题任何帮助将不胜感激。
I'm trying to setup Xcode SCM using Subversion (SVN) on a network disk (mounted). I was able to setup SVN repository on my machine locally, and everything worked smoothly without any hassle. Reference Article: Version Control is Your Friend by Jeff LaMarche
My problem is that I'm unable to set-up SVN on a network drive (mounted).
cd [mounted_drive]/Users/Shared
mkdir subversion
cd subversion
mkdir HelloWorld
svnadmin create HelloWorld
chmod -R 777 HelloWorld
The above commands work fine and main subversion repository is successfully created. The problem is that it doesn't allow me to create sub-folders (trunk, branch, and tag) in the main SVN repository.
svn mkdir
file:///[mounted_drive]/Users/Shared/Subversion/HelloWorld/trunk
file:///[mounted_drive]/Users/Shared/Subversion/HelloWorld/branch
file:///[mounted_drive]/Users/Shared/Subversion/HelloWorld/tag
When i try to run the svn mkdir command above, I get the following svn error:
"svn: Can't get exclusive lock on file
'[mounted_drive]/[subversion_repository_directory]/db/write-lock': Operation not supported"
If i control the remote machine, and run the above command natively, it works and trunk, branch and tag directories are created.
After setting the Xcode's SCM to the remote repository, if i try to "Import" code into this repository (remotely), Xcode returns the following error:
"svn: Can't get exclusive lock on file
'[mounted_drive]/[subversion_repository_directory]/db/transactions/3-1.txvn/rev-lock': Operation not supported"
Crux of this whole story: I'm facing a lot of issues while setting-up SVN on a network drive. Any help will be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
去阅读这本书。我会等待。严重地。
不要通过将共享存储库扔到网络驱动器上然后通过
file:///
与其进行通信来设置共享存储库。由于(除其他外)网络文件系统的锁定语义,对存储库的file:///
访问仅适用于本地磁盘。相反,请选择一台用于保存存储库的计算机。我们将其称为 Hezikiah 在该系统上运行
svnserve
以使存储库在网络上可用。通过 svn://hezikia/REPO_NAME 访问您的存储库。这本书对此很有帮助。
Go read the book. I'll wait. Seriously.
Do not set up a shared repository by tossing it on a network drive and then talking to it via
file:///
.file:///
access to repositories is only meant for local disk because of (among other things) the locking semantics of network file systems.Instead, choose a computer on which you'll keep your repositories. Let's call it Hezikiah Run
svnserve
on that system to make the repositories available on the network. Access your repository as svn://hezikia/REPO_NAME.The book is a great help there.
根据所使用的协议和配置,网络文件系统可能不支持本地文件系统的所有功能。 Subversion 正在尝试获取网络文件系统上的独占锁,但无法。您可以通过调整 Subversion 目录的权限或使用不同的协议来更改服务器的配置。但是,使用网络卷首先就是错误的方法。
您真正想要做的是在联网服务器上设置 Subversion 服务器,并在处理项目时查看存储库的本地副本。
Networked file systems, depending upon protocol used and configuration, may not support all the functions of your local file system. Subversion is trying to get an exclusive lock on the network file system, but can't. You could change the configuration of your server, maybe by adjusting permissions on your Subversion directories, or using a different protocol. But, using a network volume is the wrong approach in the first place.
What you really want to do is set up a Subversion server on the networked server, and check out a local copy of the repository while working on a project.
可以构建一个不存在此问题的 subversion 版本。
看来问题是 apr 和 apr-util 库(参见 Subversion、Mac OS X 和 SMB)。
我使用的解决方法是使用 OS X 的 apr、apr-util 和 apr-util 版本来编译 subversion。 apxs 库。
操作方法如下:
./configure --prefix=/opt/subversion/ --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --without-berkeley-db --with-apxs=/usr/sbin/apxs
/opt/subversion
中,如果您使用 svnX,这会很方便。sudo make install
我已经在 OS X 10.5(版本为 1.6.13)上成功完成了此操作。
svnX 对此也很满意。
It is possible to build a version of subversion that doesn't have this problem.
It seems that the problem is the apr and apr-util libraries (see Subversion, Mac OS X, and SMB).
The work around I used is to compile subversion using OS X's versions apr, apr-util & apxs libraries.
Here is how to do it:
./configure --prefix=/opt/subversion/ --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --without-berkeley-db --with-apxs=/usr/sbin/apxs
/opt/subversion
, which is handy if you use svnX.sudo make install
I have successfully done this on OS X 10.5, with subversion 1.6.13.
svnX is happy with this too.
太棒了,我使用 Yafiyogi 的提示编译了我自己的颠覆 - 伟大的人,它有效,不再有锁定文件的麻烦了!我可以通过 AFP 或 AFP 访问时间胶囊磁盘上的颠覆存储库。 WLAN远程使用版本svn客户端。我的配置:
./configure -- with-apr=/usr/local/apr/make/make install
)Great, I compiled my own subversion using Yafiyogi's hint - great man it works, no lock file troubles anymore! I'm able to access a subversion repository on a timecapsule disk via AFP resp. WLAN remotely using the versions svn client. My confiuration:
./configure --with-apr=/usr/local/apr/make/make install
)