我正在尝试遵循http://svnbook.red-bean.com/en/1.7/svn.branchmerge.commonpatterns.html中描述的发布分支模型,但是在尝试进行合并时,我遇到了合并冲突。
# Normal SVN Structure
svn-testing2> ls -l
total 12K
drwxrwxr-x 3 xxx yyy 4.0K Jan 13 17:28 branches/
drwxrwxr-x 3 xxx yyy 4.0K Jan 13 17:28 tags/
drwxrwxr-x 3 xxx yyy 4.0K Jan 13 17:28 trunk/
# Create & commit some data
svn-testing2> echo "line1" > trunk/file1; svn add trunk/file1; svn commit -m "created file1 " trunk/file1
Adding trunk/file1
Transmitting file data .
Committed revision 2.
# Create the release branch
svn-testing2> svn copy trunk branches/release
A branches/release
svn-testing2> svn commit -m "created release branch" branches/release
Adding branches/release
Adding branches/release/file1
Committed revision 3.
# Make & commit a change to trunk
svn-testing2> echo "line1-file2" > trunk/file2; svn add trunk/file2; svn commit -m "created file2" trunk/file2
A trunk/file2
Adding trunk/file2
Transmitting file data .
Committed revision 4.
# Attempt to merge the change to trunk:
svn-testing2> cd branches/release/
svn-testing2/branches/release> svn merge ^/trunk
--- Merging r2 through r4 into '.':
C file1
A file2
Summary of conflicts:
Tree conflicts: 1
bumjvr@mbs-p:~/svn-testing/svn-testing2/branches/release> svn st
M .
C file1
> local add, incoming add upon merge
A + file2
我可以用
svn-testing2> svn resolve --accept=working *
但我必须这样做似乎是错误的。
如果我随后将“修补程序”(例如创建“release/file3”)应用到我的发布分支,我如何将其移植回主干?如果我将“release”合并到“trunk”,它会合并,但是当将“trunk”合并回“release”时,我会local add, incoming add upon merge
在例如“file3”上遇到另一个冲突
我不是想“重新整合”一个特性分支,因为它们都是长期运行的分支。
令人沮丧的是,SVN 红皮书(通常非常好)描述了这种常见的分支模式,没有实际运行哪些命令的工作示例!
在没有所有这些不正确的合并冲突的情况下,我究竟需要运行什么来遵循这种分支模式?或者在任何地方都有这种分支模式的工作示例 - 我找不到任何!