Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-4663

Tree conflict problem when merging two branches

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.4, 1.9.5
    • Fix Version/s: 1.10.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows, TortoiseSVN, Command line

      Description

      Bug confirmed by Branko Čibej <brane@apache.org> on users mailing list.

      Quick verbal description of how to recreate the issue:

      -Create a repository (with trunk/tags/branches structure),
      -Checkout /trunk,
      -Create branch1 in /branches/branch1, and checkout.
      -Create and checkout branch2.
      -Create file.txt in Trunk + add + commit.
      -Merge trunk changes into branch1 and commit.
      -Merge trunk changes into branch2 and commit.

      The problem:
      -Merge branch1 changes into branch2, gives me a Tree conflict with file.txt.

      1. transcript-1.9.4.txt
        2 kB
        André Roy
      2. transcript-trunk.sh
        3 kB
        André Roy
      3. repeat.sh
        0.7 kB
        André Roy

        Activity

        Hide
        andre@dsa-ltd.ca André Roy added a comment - - edited

        Added transcript for reproducing the error. Thanks Branko!

        Show
        andre@dsa-ltd.ca André Roy added a comment - - edited Added transcript for reproducing the error. Thanks Branko!
        Hide
        stsp Stefan Sperling added a comment - - edited

        I have repeated the problem with the attached repeat.sh script.
        Thank you for providing this script!

        I consider this issue fixed by the new conflict resolver in 1.10:
        https://subversion.apache.org/docs/release-notes/1.10.html#conflict-resolver

        This transcript shows how 1.10 will handle this situation:

        + svn merge ^/branches/branch1 .
        --- Merging r4 through r8 into '.':
           C file.txt
         G   .
        --- Recording mergeinfo for merge of r4 through r8 into '.':
         U   .
        Summary of conflicts:
          Tree conflicts: 1
        Searching tree conflict details for 'file.txt' in repository:
        Checking r6... done
        Tree conflict on 'file.txt':
        A new file appeared during merge of
        '^/branches/branch1/file.txt:4-8'.
        It was added by stsp in r6.
        A file which already occupies this path was found in the working copy.
        Select: (p) Postpone, (r) Mark as resolved, (m) Merge the files,
                (M) Replace and merge, (h) Help, (q) Quit resolution: m
        G    file.txt
        Tree conflict at 'file.txt' marked as resolved.
        Summary of conflicts:
          Tree conflicts: 0 remaining (and 1 already resolved)
        + svn ci -mtest
        Sending        .
        Committing transaction...
        Committed revision 9.
        

        The text merge is a no-op and results in an empty diff. This is expected.

        The m and M options allow the user to choose which history the merged file should follow (branch2 or branch1) when the user runs 'svn log file.txt'.
        This decision is not automated at present, so this kind of merge requires user input, but that's a separate problem.

        I am going to mark this issue as fixed.

        Show
        stsp Stefan Sperling added a comment - - edited I have repeated the problem with the attached repeat.sh script. Thank you for providing this script! I consider this issue fixed by the new conflict resolver in 1.10: https://subversion.apache.org/docs/release-notes/1.10.html#conflict-resolver This transcript shows how 1.10 will handle this situation: + svn merge ^/branches/branch1 . --- Merging r4 through r8 into '.': C file.txt G . --- Recording mergeinfo for merge of r4 through r8 into '.': U . Summary of conflicts: Tree conflicts: 1 Searching tree conflict details for 'file.txt' in repository: Checking r6... done Tree conflict on 'file.txt': A new file appeared during merge of '^/branches/branch1/file.txt:4-8'. It was added by stsp in r6. A file which already occupies this path was found in the working copy. Select: (p) Postpone, (r) Mark as resolved, (m) Merge the files, (M) Replace and merge, (h) Help, (q) Quit resolution: m G file.txt Tree conflict at 'file.txt' marked as resolved. Summary of conflicts: Tree conflicts: 0 remaining (and 1 already resolved) + svn ci -mtest Sending . Committing transaction... Committed revision 9. The text merge is a no-op and results in an empty diff. This is expected. The m and M options allow the user to choose which history the merged file should follow (branch2 or branch1) when the user runs 'svn log file.txt'. This decision is not automated at present, so this kind of merge requires user input, but that's a separate problem. I am going to mark this issue as fixed.

          People

          • Assignee:
            Unassigned
            Reporter:
            andre@dsa-ltd.ca André Roy
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development