Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can file based SVN repository support simultaneous multi-user situation?

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?

like image 650
eonil Avatar asked Nov 11 '11 02:11

eonil


People also ask

What is the purpose of an SVN Subversion repository?

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.

What are the advantages of SVN?

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.

Which one of the differences between Git and SVN is correct?

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.

Can I use Git and SVN at the same time?

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.


2 Answers

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:

  • It has to be on the same server. There are people who put the repository on a Windows share or a NFS drive, then have people mount the share and use the file:// scheme. This will not work. It must be on the same machine in order for the file:// access scheme to work.
  • It is unsafe. This is the biggest issue. All users must have read/write permission on the files in the repository which means someone can delete the repository or futz around with the files behind Subversion's back.
  • Using 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.
like image 74
David W. Avatar answered Sep 30 '22 02:09

David W.


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.

like image 39
Adrian Shum Avatar answered Sep 30 '22 01:09

Adrian Shum