Is svnserve not strictly required for a local, single-user repo?

237 Views Asked by At

I was reading the Red Bean book and noticed this paragraph:

Do not be seduced by the simple idea of having all of your users access a repository directly via file:// URLs. Even if the repository is readily available to everyone via a network share, this is a bad idea. It removes any layers of protection between the users and the repository: users can accidentally (or intentionally) corrupt the repository database, it becomes hard to take the repository offline for inspection or upgrade, and it can lead to a mess of file permission problems (see the section called “Supporting Multiple Repository Access Methods”). Note that this is also one of the reasons we warn against accessing repositories via svn+ssh:// URLs—from a security standpoint, it's effectively the same as local users accessing via file://, and it can entail all the same problems if the administrator isn't careful.

I realized that, since I'm the only one accessing the repository, ever, none of these caveats seem to apply. Can I safely down svnserve then and only ever have to worry about upgrading my TortoiseSVN client, not both the client and the server whenever there's a new version out?

(I've tried it already--just needed to use the Relocate feature to switch from svn:// to file://--but I wanted to make sure something wouldn't be sneaking up on me if I left it this way.)

3

There are 3 best solutions below

0
On BEST ANSWER

Yes. These warnings do not apply if you are the only one ever accessing the repository.

0
On

I've been using SVN with Tortoise and Slik Subversion clients using the single-user file:// urls for a couple of years now, with absolutely zero problems. But if you ever, ever think you will need multi-user access, you need to use one of the server access methods - don't be tempted to put a file:// repository on a shared network drive.

0
On

One potential problem I see is with svn there is a level of indirection between you and the repository so that you maybe able to move a repository without it affecting working copies which you cant using the file url.

i.e if youre repository is in /user/repos and you ran

svnserve as svnserve --daemon --root /user

the user would access file using

svn://localhost/repos if later on you have to use change the repository to now be in /user2 you can just run

svnserve --daemon --root /user2

and existing checkout code would still be ok, wheras if using file protocol you would have to relocate your files.