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

inconsistencies in merge handling of adds vs. edits in shallow targets

    XMLWordPrintableJSON

Details

    Description

      When a merge target has an ambient depth < infinity, any modifications which
      produce changes at a level greater than that depth should produce skips.  For
      example:
      
      ### If we merge a text change into a infinite depth WC the
      ### diff is applied and normal mergeinfo is recorded:
      
      >svn merge ^^/A branch-infinity -c5
      --- Merging r5 into 'branch-infinity':
      U    branch-infinity\D\G\rho
      --- Recording mergeinfo for merge of r5 into 'branch-infinity':
       U   branch-infinity
      
      >svn pl -vR branch-infinity
      Properties on 'branch-infinity':
        svn:mergeinfo
          /A:5
      
      ### But if we merge the same change into a WC target that differs
      ### only in that its depth is empty, the change is skipped and
      ### non-inheritable mergeinfo is recorded to describe the merge:
      
      >svn merge ^^/A branch-empty -c5
      Skipped 'branch-empty\D'
      --- Recording mergeinfo for merge of r5 into 'branch-empty':
       U   branch-empty
      Summary of conflicts:
        Skipped paths: 1
      
      >svn st
       M      branch-empty
      
      >svn pl -vR branch-empty
      Properties on 'branch-empty':
        svn:mergeinfo
          /A:5*
      
      ### A curious problem arises however if the diff to be applied
      ### includes added subtrees that are only one level deeper than
      ### the ambient depth of the merge target.
      
      ### Given a rev range that adds these subtrees: 
      
      >svn diff --summarize -r7:11
      A       A\Z
      A       A\C\deep-nu
      A       A\C\X
      A       A\nu
      
      ### The "deep" adds are properly skipped, but 'nu' and 'Z' are added
      ### despite being deeper than the ambient depth of the WC!
      
      >svn merge ^^/A branch-empty -r7:11
      Skipped 'branch-empty\C'
      --- Merging r8 through r11 into 'branch-empty':
      A    branch-empty\nu <--- The depth of the WC is empty!
      A    branch-empty\Z  <--- The depth of the WC is empty!
      --- Recording mergeinfo for merge of r8 through r11 into 'branch-empty':
       U   branch-empty
       U   branch-empty\nu
       U   branch-empty\Z
      Summary of conflicts:
        Skipped paths: 1
      
      ### Similar behavior occurs when the depth is 'files' or 'immediates':
      
      >svn merge ^^/A branch-files -r7:11
      --- Merging r8 through r11 into 'branch-files':
      A    branch-files\Z <--- The depth of the WC is files!
      Skipped 'branch-files\C'
      A    branch-files\nu
      --- Recording mergeinfo for merge of r8 through r11 into 'branch-files':
       U   branch-files
       U   branch-files\nu
       U   branch-files\Z
      Summary of conflicts:
        Skipped paths: 1
      
      >svn merge ^^/A branch-immediates -r7:11
      --- Merging r8 through r11 into 'branch-immediates':
      A    branch-immediates\Z
      --- Merging r8 through r11 into 'branch-immediates\C':
      A    branch-immediates\C\X       <--- The depth of the WC is immediates!
      A    branch-immediates\C\deep-nu <--- The depth of the WC is immediates!
      --- Merging r8 through r11 into 'branch-immediates':
      A    branch-immediates\nu
      --- Recording mergeinfo for merge of r8 through r11 into 'branch-immediates':
       U   branch-immediates
      --- Recording mergeinfo for merge of r8 through r11 into 'branch-immediates\C':
       U   branch-immediates\C
       U   branch-immediates\C\X
       U   branch-immediates\C\deep-nu
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pburba Paul Burba
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: