SVN control of a shared virtual machine folder

▼魔方 西西 提交于 2020-01-04 15:52:13

问题


I have an SVN checkout on a Mac using subclipse. I want to be able to share this folder with a vmware shared folder in Windows 7 and perform updates/commits using tortoiseSVN (on the VM) and/or subclipse (on the Mac).

Is this possible? or will the two be in conflict?

The shared drive has the hidden ".svn" folders created by subclipse. What else does tortoise need to recognize the checkout?


回答1:


Sharing a working copy is never a good idea. You could do it if the OS you share it with are all the same (e.g., all Windows or all Mac stations). But you must not share it ever if the OS are not the same!

One obvious reason not to share a working copy between OS: there's the svn:eol-style property which has native as one possible value. If you share such a wc between OSes, that would end up in conflict.

But that's just the most obvious and visible reason. The working copy metadata (the data stored in the hidden .svn folder) also has some OS specific stuff in there, and that's where you really will mess up your working copy up to the point of no repair.




回答2:


Don't just share a repository. Source code control repositories (including SVN repositories) have hard to assure requirements once you put a network in between the repository and the client. To guard against failures due to a network in the middle, SVN (and other source code control systems) have protocols built on top of them that work predictably even if the network fails.

By mapping a drive and using file based protocols, you circumvent all of the protections built in place to deal with networking issues, instead you should look to using a network protocol on top of your repository. SVN comes by default with four to choose from svn:// svn+ssh:// http:// https://.

Then you would have one repository and two people connecting to it, and the code will be shared and sync'd between everyone.

There are MAC svn clients, so if you are very familiar with TortiseSVN, you might have to learn a new client, but that's the worst that could happen. With your current (less desirable) approach, the worst that could happen is that you corrupt your local repository, and lose the work for both the windows and mac machines.




回答3:


From the other post responses and comments, it sounds like it's a bad idea to have two subversion clients working on the same folder. I think you could still share the working folder itself, however, so that you could switch to the other OS and try out the current state of the working directory on the different OS. Just make sure you always commit from a single SVN client on one OS.

Here is information on how to share the work folder.



来源:https://stackoverflow.com/questions/11159173/svn-control-of-a-shared-virtual-machine-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!