If multiple users accesses file based SVN repository to commit many things simultaneously, can SVN guarantee data integrity? If it is, how? Or if it isn't what serving method should I use for multi-user situation?
Subversion is used for maintaining current and historical versions of projects. Subversion is an open source centralized version control system. It's licensed under Apache. It's also referred to as a software version and revisioning control system.
SVN also enables you to quickly retrieve versions of a code repository through the checkout process. While SVN doesn't support nested repositories, you can still retrieve and combine changes found in multiple code repositories into one working copy of the code using the command svn:externals.
The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.
You can clone a subversion repository to your machine using git svn clone <SVN repo URL> . The code will be available as a git repository. You can do your work there and make local commits as you please. There is a command line option to get a "shallow" checkout rather than the entire repository which is often useful.
From the Subversion book:
A Subversion repository can be accessed simultaneously by clients running on the same machine on which the repository resides using URLs carrying the file:// scheme. But the typical Subversion setup involves a single server machine being accessed from clients on computers all over the office—or, perhaps, all over the world.
There are several issues with the file://
scheme:
file://
scheme. This will not work. It must be on the same machine in order for the file://
access scheme to work.svn://
and http://
isn't all that hard to setup. I use Subversion as my own personal version control system, and I use the svn://
scheme. Subversion with http://
is slightly more involved, but I can reliably do it in about an hour.Just to share my past experience.
My company had a project hosted on SVN. Originally the development team used file:// protocol to access a repository on a SMB shared volume. Honestly it seems working fine. However the performance is simply terrible. When I say terrible, it is like spending minutes for an update/commit. Moreover, I think you can see similar statement from different sources or reference: file:// protocol aimed only for single user access in local machine.
When I get involved in the project, I immediately change to use svnserve for ad-hoc strategy of multi-user access (Although I personally use http for other svn repositories administrated by me). We immediately saw performance improvement in order of magnitude. The extra time for the setup is simply 2 minutes (as we have a server that I can simply start svnserve in console mode and leave it running). Unless you really really cannot arrange any machine to run svnserve/apache, I cannot see any reason to stick to file:// protocol for multi-user access.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With