Advantages/Disadvantages of server-less Subversion for solo developer
TortoiseSVN is good for this?
What ab开发者_运维百科out best practices to work fine?
Any special care about tricky issues using that way?
For a single developer it is ok.
But I strictly discourage from using it with more than one developer.
The SVN book says:
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 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-permissions 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 can entail all the same problems if the administrator isn't careful.
(From: http://svnbook.red-bean.com/en/1.4/svn.serverconfig.choosing.html)
Installing svnserve isn't that complicated and it's really worth putting an hour or two in configuration.
Obvious downside: even if you're using RAID so you've got redundancy on the disks, if your computer is lost or stolen, you're hosed. If you've got the source hosted on a server somewhere, then if either the server or your client machine gets stolen, you'll have another copy. (Admittedly if the server is stolen you'll lose history and branches, but it's better than nothing.)
I do this. I use a shared folder called SVN. Inside this folder is each of my subversion repositories for various projects.
Have not had any issues. I now host this on a RAID 5 array for redundancy.
I should point out that have been doing this for over 3 years.
I also set this up in a corporate environment for the last 2 years where the repository has had over 200 checkins and the size is over 200Mb.
I used to run a Linux box just to host a SVN server (I do almost all my development on Windows) but I got fed up with it howling away under my desk and switched to single-user SVN hosted on Windows. I've had no problems (touch wood) but I do take care to back up all my SVN repositories frequently, so that at most I could lose a days worth of work. No need for complex backup procedures, just buy yourself a few USB flash memory thingies and simply copy the SVN archive directories to them.
My suggestion is that you must be very careful with permissions. I found some occasional troubles in a solo-developer configuration, so if something acts weird check permissions and lock status of the repository first. If you have like me multiple unrelated projects, what I do is to create a dir for each project, and into this dir I put two subdirs: SVN which contains the repo for the project, and "checkout" which contains the actual checkout. I use this approach because I have automatic backup of my home directory, hence I get to backup both the project and its repository. Alternatively, you can put the repo somewhere else (which must be kept backed-up).
精彩评论