changing subversion repository layout - should I use relocate on the client?
When we started using subversion, I created a single repository and created the trunk/branches/tags folders directly at the root level of the repository. For example, I'm accessing the trunk using an URL like this:
svn://server/repository_name/trunk
Now I'd like to add other projects to the same repository, which means I'd like to add another level between repos开发者_开发技巧itory name and trunk, e.g:
svn://server/repository_name/project/trunk
I can easily reorganize the repository in the TortoiseSVN repository browser. But what should be done with the existing working copies:
- is "relocate" the correct operation or does this require a fresh checkout?
- in the first case, does it matter if the working copy contains local (uncommited) changes?
- bonus question: would there be any difference, if I'd decided to also change the repository name?
The "relocate" is the correct way, but you should commit the changes first and then do the reorganization. You change the repository as well. The relocate will handle this as well.
The cleanest way to accomplish a change like this is to:
- Commit all your and other developers changes.
- Delete your and other developers working copy.
- Make your changes to the repository directly with a repository manager tool (ex. TortoiseSVN).
- Everyone checks out a new working copy. Every change you implemented in the repository is reflected in the new working copies (Name changes, moves, etc.).
In my experience the relocate command is confusing to others. As an SVN admin, I can visualize it just fine, but, in a software organization you are limited by the least common denominator. The steps above are the easiest most direct method.
If you have code that you really don't want to check in at the moment, then just leave that working copy in place and make a new working copy in another location. Just bear in mind that the old working copy is not valid for check in. Rename the root directory and delete the .svn subdirectories.
精彩评论