SVN切换与在多个项目存储库案例中的迁移 [英] SVN switch vs relocate in a multiple project repository case
问题描述
我们的雇主有一个非常复杂的SVN树,该树在同一存储库中包含多个项目树,如下所示(此图中的每个叶子都具有完整的主干/分支/标签结构,顺便说一句)
We have a very complex SVN tree at my employer that has several project trees contained within the same repository, as follows (each leaf in this diagram has a complete trunk/branches/tags structure in it, btw)
svn.contoso.com/root_repository_path/
|- project1
|- project2
| |- subprojectA
| |- subprojectB
|- project3
|- project4
|- |- subprojectA
|- |- subprojectB
|- project5 (the project I'm on)
到目前为止,这个方法工作正常.但是,一位开发人员进行了一些重组,并将project5(我正在处理的项目)移至project4(该文件夹包含几个相关项目)下.如何迁移工作副本以使用新路径?我是否需要重新定位,切换,两者都做或者做其他事情? (请注意,我至少有一项未提交更改,因此,如果可能的话,我要避免检查新的WC.)
This works fine so far. However, a fellow developer did a bit of reorganizing, and moved project5 (the project I am working on) up under project4 (which is a folder containing several related projects). How do I migrate my working copies to use the new path? Do I need to relocate, switch, both, or do something else? (Note that I have uncommitted changes in at least one of them, so checking out a fresh WC is something I want to avoid if at all possible.)
推荐答案
首先,在进行任何操作之前,我都会先为您的工作副本制作一份手动副本,以确保您不会丢失工作副本中的更改.
First, I'd make a manual copy of your working copy before doing anything just to make sure that you don't lose the changes in your working copy.
由于该项目已在同一存储库中移动,因此您要使用svn switch
.
Since the project was moved within the same repository, you'd want to use svn switch
.
将工作副本更新到相同存储库中的另一个URL(即切换到另一个分支)时,请使用svn switch
.
Use svn switch
when updating your working copy to another URL in the same repository (i.e. switching to another branch).
http://svnbook.red- bean.com/en/1.7/svn.ref.svn.c.switch.html
在将工作副本更新为不同存储库中的另一个URL时,使用svn relocate
.
Use svn relocate
when updating your working copy to another URL in a different repository.
http://svnbook.red- bean.com/en/1.7/svn.ref.svn.c.relocate.html
这篇关于SVN切换与在多个项目存储库案例中的迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!