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

Reverse merge which adds subtree fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.x
    • 1.7.0
    • libsvn_client
    • None

    Description

      Found this while working on issue #3975: There's a bug in the way we record
      mergeinfo on subtrees added during a *reverse* merge:
      
      Starting with a standard Greek tree:
      
      Delete a subtree in the "trunk":
      
        >svn del A\D\H\chi
        D         A\D\H\chi
      
        >svn ci -m ""
        Deleting       A\D\H\chi
      
        Committed revision 7.
      
        >svn up -q
      
      Merge that deletion to the root of the "branch":
      
        >svn merge ^^/A A_COPY -c7
        --- Merging r7 into 'A_COPY':
        D    A_COPY\D\H\chi
        --- Recording mergeinfo for merge of r7 into 'A_COPY':
         U   A_COPY
      
      Do a subtree merge that creates non-inheritable mergeinfo on the immediate
      parent of the deleted subtree:
      
        >svn merge ^^/A/D/H A_COPY\D\H --depth files
        --- Merging r2 through r6 into 'A_COPY\D\H\omega':
        U    A_COPY\D\H\omega
        --- Merging r2 through r6 into 'A_COPY\D\H\psi':
        U    A_COPY\D\H\psi
        --- Recording mergeinfo for merge of r2 through r7 into 'A_COPY\D\H':
         G   A_COPY\D\H
        --- Recording mergeinfo for merge of r2 through r7 into 'A_COPY\D\H\omega':
         G   A_COPY\D\H\omega
        --- Recording mergeinfo for merge of r2 through r7 into 'A_COPY\D\H\psi':
         G   A_COPY\D\H\psi
      
        >svn pl -vR
        Properties on 'A_COPY':
          svn:mergeinfo
            /A:7
        Properties on 'A_COPY\D\H':
          svn:mergeinfo
            /A/D/H:2-6*,7
        Properties on 'A_COPY\D\H\omega':
          svn:mergeinfo
            /A/D/H/omega:2-7
        Properties on 'A_COPY\D\H\psi':
          svn:mergeinfo
            /A/D/H/psi:2-7
      
      Commit the merge:
      
        >svn ci -m "" -q
        Sending        A_COPY
        Sending        A_COPY\D\H
        Deleting       A_COPY\D\H\chi
        Sending        A_COPY\D\H\omega
        Sending        A_COPY\D\H\psi
        Transmitting file data ..
        Committed revision 8.
      
        >svn up -q
      
      Now try reverse merging the deletion.  The subtree is added, but there are
      problems recording the mergeinfo describing the merge: 
      
        >svn merge ^^/A A_COPY -c-7
        --- Reverse-merging r7 into 'A_COPY\D\H':
        A    A_COPY\D\H\chi
        --- Recording mergeinfo for reverse merge of r7 into 'A_COPY':
         U   A_COPY
        --- Recording mergeinfo for reverse merge of r7 into 'A_COPY\D\H':
         U   A_COPY\D\H
        ..\..\..\subversion\svn\util.c:913: (apr_err=200020)
        ..\..\..\subversion\libsvn_client\merge.c:10990: (apr_err=200020)
        ..\..\..\subversion\libsvn_client\merge.c:10944: (apr_err=200020)
        ..\..\..\subversion\libsvn_client\merge.c:10944: (apr_err=200020)
        ..\..\..\subversion\libsvn_client\merge.c:10914: (apr_err=200020)
        ..\..\..\subversion\libsvn_client\merge.c:8928: (apr_err=200020)
        ..\..\..\subversion\libsvn_client\merge.c:7850: (apr_err=200020)
        ..\..\..\subversion\libsvn_client\mergeinfo.c:120: (apr_err=200020)
        ..\..\..\subversion\libsvn_wc\props.c:2472: (apr_err=200020)
        ..\..\..\subversion\libsvn_wc\props.c:2247: (apr_err=200020)
        ..\..\..\subversion\libsvn_wc\props.c:2576: (apr_err=200020)
        ..\..\..\subversion\libsvn_subr\mergeinfo.c:705: (apr_err=200020)
        svn: E200020: Could not parse mergeinfo string '-7'
        ..\..\..\subversion\libsvn_subr\mergeinfo.c:688: (apr_err=200022)
        ..\..\..\subversion\libsvn_subr\mergeinfo.c:607: (apr_err=200022)
        ..\..\..\subversion\libsvn_subr\mergeinfo.c:504: (apr_err=200022)
        ..\..\..\subversion\libsvn_subr\kitchensink.c:57: (apr_err=200022)
        svn: E200022: Negative revision number found parsing '-7'
      
      Right now this an edge case because the code in question
      (libsvn_client/merge.c:record_mergeinfo_for_added_subtrees) only kicks in when
      an added subtree has an immediate parent with non-inheritable mergeinfo, but
      once issue #3975 is fixed this will be more common.
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: