Is renaming a folder in SVN a good idea? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this questionI have the following SVN (standard) structure:
Project1
trunk
tags
branches
Project1 is the project code name. After it is done, it is shifted to a Product. The problem is that after a year, I forget the project name for the product. I'd like to rename the SVN Project1 to Product1.
Are there any gotchas that will 开发者_JAVA技巧come from this?
svn help mv
move (mv, rename, ren): Move and/or rename something in working copy or repository.
usage: move SRC... DST
One more reason to use this command instead of deleting and then recreating(looks easier at first sight) is that SVN history for this file/folder won't be lost.
I did this kind of things several times and didn't get any special problems.
As much as I remember, most important thing is to commit all changes from all local directories (especially if there are several developers) before you change the name. After you change the project name, the path is changed and you cannot use the "switch" option of the TortoiseSVN and you will need to use "SVN Checkout" to start working on the project again.
You can use
svn rename
but remember to commit after you rename, otherwise there might be issues. For further details read this
http://juicebar.wordpress.com/2007/05/04/svn-rename-pitfalls-to-avoid/
People having local copies can relocate.
Gotchas I can think of:
- Adapt the automatic build tools or CI server to the right path
- If you made use of svn:externals take care of redirecting them too
- and the rights defined in the svn server config files, check the paths
- And not to forget the commit/revision... hook scripts.
I believe that appropriate naming is something important enough, as to change it as needed.
You have to rename in SVN, not only in your environment.
With TortoiseSVN, this happens with a mouse right-drag ! Tricky maneuver :-)
Take care of impacting also scripts and so on...
精彩评论