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

svn merge between similar-but-ancestrally-unrelated dirs into a third similar dir fails.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • all
    • unscheduled
    • unknown
    • None

    Description

      The following script fails like so:
      
         Trying our merge now...
         D         wc/apply/A/B/alpha
         D         wc/apply/A/B/beta
         D         wc/apply/A/B
         D         wc/apply/A/mu
         D         wc/apply/A
         D         wc/apply/A
         subversion/libsvn_wc/adm_ops.c:925: (apr_err=155013)
         svn: Unmergeable scheduling requested on an entry
         svn: Can not add 'wc/apply/A/A' to a parent directory scheduled for
      deletion
      
      -----------------[ recipe.sh ]----------------
      
      #!/bin/sh
      
      REPO=file://`pwd`/repo
      
      # Cleanup.
      rm -rf repo wc
      
      # Repos creation.
      svnadmin create repo
      
      # Make a cute little tree with three identical directories.
      mkdir wc
      mkdir wc/base1
      echo "This is the file iota" > wc/base1/iota
      mkdir wc/base1/A
      echo "This is the file mu" > wc/base1/A/mu
      mkdir wc/base1/A/B
      echo "This is the file alpha" > wc/base1/A/B/alpha
      echo "This is the file beta" > wc/base1/A/B/beta
      cp -r wc/base1 wc/base2
      cp -r wc/base1 wc/apply
      
      # Now, modify some stuff in the base2 directory
      echo "And now I have more data" >> wc/base2/A/mu
      mv wc/base2/A/B/beta wc/base2/A/B/zeta
      
      # Import the tree
      svn import ${REPO} wc -m "Initial import"
      
      # Checkout the tree
      rm -rf wc
      svn co ${REPO} wc
      
      # Now, do a merge (base2:base1 -> apply).  It will fail with what
      # looks like a bogus path.
      echo "Trying our merge now..."
      svn merge ${REPO}/base1 ${REPO}/base2 wc/apply
      
      # If, however, you try again with the --ignore-ancestry flag, it
      # works.  This is, however, not an acceptable response to the previous 
      # error. :-)
      
      # svn merge ${REPO}/base2 ${REPO}/base1 wc/apply --ignore-ancestry
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            cmpilato C. Michael Pilato
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: