我对颠覆很陌生,我想知道如何构建存储库。
正如我所读到的,'trunk' 目录用于主要开发,'tags' 用于快照版本,'branches' 用于进行一些大的更改/测试而不干扰主干。
问题是当有两个主要版本要并行开发时:我不太清楚如何构建它。我以 python 语言为例,版本 2 和 3 都在开发中,我看到了这些结构的可能性:
1st one :
===========
repos/
python2/
trunk/
tags/
V2.5/
V2.6/
V2.7/
branches/
big_modif1/
testing2/
python3/
trunk/
tags/
V3.0/
V3.1/
V3.2/
branches/
big_modif43/
testing37/
2nd one :
===========
repos/
python/
trunk/
V2/
V3/
tags/
V2.5/
V2.6/
V2.7/
V3.0/
V3.1/
V3.2/
branches/
big_modif_on_v2.x/
testing2_on_v2.x/
big_modif43_on_v3.x/
testing37_on_v3.x/
3rd one :
===========
repos/
python/
trunk/
tags/
V2.5/
V2.6/
V2.7/
V3.0/
V3.1/
V3.2/
branches/
V2_trunk/
V3_trunk/
big_modif_on_v2.x/
testing2_on_v2.x/
big_modif43_on_v3.x/
testing37_on_v3.x/
您会选择什么(当然,您可以提出其他建议)?
最佳答案
我认为组合可能是最好的。让我用你的例子解释一下:
所以我会遵循 "single project repo layout" (在 SVN red book 中描述):
repos/
python/
trunk/
branches/
V2/
tags/
...
V2.7/
...
V3.2/
这里的要点是,在第 3 版的开发开始时,V2 已经分支。并且您应该遵守以下合并规则:
关于SVN : repository structure when 2 differents major version development in parallel?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8240160/