Subversion合并行为

时间:2012-03-16 01:32:42

标签: svn svn-merge

我已经创建了一个快速示例来演示我的问题。从下面的日志中您将看到以下内容:

  1. r1 - created trunk
  2. r2 - 创建分支
  3. r3 - 将foo.txt添加到trunk
  4. r4 - 创建了QA分支
  5. r5 - 创建了英国分公司
  6. r6 - 创建了TEAM分支
  7. r7 - 更新了foo.txt并在TEAM分支上添加了栏
  8. r8 - 将TEAM合并为QA
  9. r9 - 将QA合并到主干
  10. 所以我的问题是当我尝试做的时候 svn merge -r9:HEAD ^ / trunk 从英国目录中我没有得到r9的变化这是预期的行为吗?

    svn log -v -g ^/
    ------------------------------------------------------------------------
    r9 | anazimok | 2012-03-15 21:16:37 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       M /trunk
       A /trunk/bar (from /branches/QA/bar:8)
       M /trunk/foo.txt
    
    merged QA into trunk
    ------------------------------------------------------------------------
    r8 | anazimok | 2012-03-15 21:16:34 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       M /branches/QA
       A /branches/QA/bar (from /branches/TEAM/bar:7)
       M /branches/QA/foo.txt
    Merged via: r9
    
    merged team into QA
    ------------------------------------------------------------------------
    r7 | anazimok | 2012-03-15 21:16:32 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       A /branches/TEAM/bar
       M /branches/TEAM/foo.txt
    Merged via: r9, r8
    
    updated on team branch
    ------------------------------------------------------------------------
    r7 | anazimok | 2012-03-15 21:16:32 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       A /branches/TEAM/bar
       M /branches/TEAM/foo.txt
    Merged via: r9
    
    updated on team branch
    ------------------------------------------------------------------------
    r8 | anazimok | 2012-03-15 21:16:34 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       M /branches/QA
       A /branches/QA/bar (from /branches/TEAM/bar:7)
       M /branches/QA/foo.txt
    
    merged team into QA
    ------------------------------------------------------------------------
    r7 | anazimok | 2012-03-15 21:16:32 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       A /branches/TEAM/bar
       M /branches/TEAM/foo.txt
    Merged via: r8
    
    updated on team branch
    ------------------------------------------------------------------------
    r7 | anazimok | 2012-03-15 21:16:32 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       A /branches/TEAM/bar
       M /branches/TEAM/foo.txt
    
    updated on team branch
    ------------------------------------------------------------------------
    r6 | anazimok | 2012-03-15 21:16:29 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       A /branches/TEAM (from /branches/QA:5)
    
    created team
    ------------------------------------------------------------------------
    r5 | anazimok | 2012-03-15 21:16:29 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       A /branches/UK (from /trunk:4)
    
    created UK
    ------------------------------------------------------------------------
    r4 | anazimok | 2012-03-15 21:16:29 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       A /branches/QA (from /trunk:3)
    
    created QA
    ------------------------------------------------------------------------
    r3 | anazimok | 2012-03-15 21:16:28 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       A /trunk/foo.txt
    
    initial commit
    ------------------------------------------------------------------------
    r2 | anazimok | 2012-03-15 21:16:27 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       A /branches
    
    created branches
    ------------------------------------------------------------------------
    r1 | anazimok | 2012-03-15 21:16:27 -0400 (Thu, 15 Mar 2012) | 1 line
    Changed paths:
       A /trunk
    
    created trunk
    ------------------------------------------------------------------------
    

2 个答案:

答案 0 :(得分:4)

您需要指定一个小于预期版本的版本,因此请尝试

svn merge -r8:HEAD ^/trunk

答案 1 :(得分:1)

您可以在简单的情况下省略merge-range。但是andreas是完全正确的:范围不包括用于起始边界