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

automatic merge confused by missing subtree merge

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • ---
    • libsvn_client
    • None

    Description

      Start with a branch ^/B1 that has subtree mergeinfo on ^/B1/S1 and ^/B1/S1.
      
      Copy ^/B1 to ^/B3 and make changes in ^/B1/S1 and ^/B3/S1.
      
      Now do a catch-up merge on ^/B3 and reintegrate merge to ^/B1, no additional
      mergeinfo is recorded on S2.
      
      Finally attempt to keepalive ^/B3 by doing another catchup merge from ^/B1. 
      This merge fails to run complaining about missing mergeinfo on S1.
      
      Script below, the final merge fails with:
      
      svn: E195016: Reintegrate can only be used if revisions 6 through 10 were
      previously merged from file:///home/pm/sw/subversion/obj/repo/B3 to the
      reintegrate source, but this is not the case:
        B1/S1
          Missing ranges: /B1/S1:7
      
      What makes this really confusing is that the catchup merge from B1 to B3 does
      not record mergeinfo on B3/S2 because there are no changes in S2. If we do an
      explicit subtree merge to force mergeinfo to be recorded then the error about a
      missing merge on S1 goes away. It's all very confusing. 
      
      Reported here:
      http://mail-archives.apache.org/mod_mbox/subversion-users/201403.mbox/%3C5318AD17.4070506@inforay.nl%3E
      http://svn.haxx.se/users/archive-2014-03/0049.shtml
      
      #!/bin/sh
      
      rm -rf repo wc
      svnadmin create repo --compatible-version 1.8
      url=file://`pwd`/repo/
      svn mkdir -mm $url/B1 ^/B1/S1 ^/B1/S2
      svn cp -mm $url/B1 ^/B2
      svn mkdir -mm $url/B2/S1/M1 ^/B2/S2/M1
      svn co $url/B1 wc
      svn merge ^/B2/S1 wc/S1
      svn merge ^/B2/S2 wc/S2
      svn ci -mm wc
      svn rm -mm $url/B2
      svn cp -mm $url/B1 ^/B3
      svn mkdir -mm $url/B1/S1/M2
      svn mkdir -mm $url/B3/S1/M3
      svn sw ^/B3 wc
      svn merge ^/B1 wc         # problem merge?
      # svn merge ^/B1/S2 wc/S2 # fixed by this merge?
      svn ci -mm wc
      svn sw ^/B1 wc
      svn merge ^/B3 wc
      svn ci -mm wc
      svn sw ^/B3 wc
      svn merge ^/B1 wc
      

      Attachments

        1. 2_i4481-b.png
          199 kB
          Julian Foad
        2. 1_i4481.png
          180 kB
          Julian Foad

        Activity

          People

            Unassigned Unassigned
            philipm Philip Martin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: