At work we've got a very large project (approx. 30,000 files) managed by a Borland StarTeam source control system. We'd like to migrate to SVN, but there are a few hurdles in the way. The most significant one is the problem of getting the repository set up on all the devs' VMs.
There are two basic ways to set up a new SVN-versioned folder on your hard drive. (On Windows, using TortoiseSVN.) You can either check out an SVN project from a repository, or take existing code and upload it to a (presumably empty) repository, and after either of these operations you end up with a folder tree with SVN metadata folders. But we have a few dozen devs who each have an entire copy of the project already. What we'd really like to do is upload it once, and then run some sort of "Associate this existing folder with the repository at [wherever] and synchronize them" operation.
Does SVN support this? If so, how, and is it possible to 开发者_JAVA百科do in TortoiseSVN, or does it require other tools?
What should work is doing a right-click "SVN checkout..." on an existing folder on your hard drive whose contents are identical with the repository you are about to check out. Every file Tortoise finds locally, it will compare to the version in the repository first, and if the checksums match (I assume it is doing some sort of checksum comparison), not download it, but mark it as "versioned" in the checkout protocol and skip to the next file.
The end result should be a nice checkout. Files that don't match the version in the repository will be overwritten to my knowledge, and cannot be restored.
This has always worked for me in the situation you are in; Make sure you have backups of your data, or try it on a smaller subset first.
精彩评论