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

bug in reverse merge when replacing a file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.x
    • 1.4.0
    • unknown
    • None
    • Linux

    Description

      If you:
      - add a file named foo       -> rev X
      - delete file foo            -> rev Y
      - add a symlink named foo    -> rev Z
      - merge a reverse patch from rev Z to rev X
      - try to commit : you get a "Commit failed: Out of date: 'foo' in transaction 'XX'"
      
      Try to reproduce yourself:
      $> cd /tmp
      $> svnadmin create --fs-type bdb test_repository
      $> svn co file:///tmp/test_repository test_wc
      $> cd test_wc
      $> echo "toto" > foo
      $> echo "titi" > bar
      $> svn add foo bar
      $> svn commit -m "adding foo and bar"  #rev1
      $> svn del foo
      $> svn commit -m "deleting foo" #rev2
      $> ln -s bar foo
      $> svn add foo
      $> svn commit -m "adding a link named foo" #rev3
      $> svn merge -r 3:1 file:///tmp/test_repository
      $> svn commit -m "reverse patch from rev3 to rev1"
      Replacing      foo
      svn: Commit failed (details follow):
      svn: Out of date: 'foo' in transaction '4'
      $> svn up
      svn: Failed to add file 'foo': object of the same name already exists
      $> svn revert -R .
      $> ls -l foo
      -rw-r--r--    1 florent  users           5 nov 21 10:43 foo
      
      oops foo is not anymore a symlink.
      
      Work arround: 
      - make a reverse patch from Z to Y  -> rev A
      - make a reverse patch from Y to X  -> rev B
      
      $> cd /tmp
      $> rm -rf test_wc
      $> svn co file:///tmp/test_repository test_wc
      $> cd test_wc
      $> svn merge -r 3:2 file:///tmp/test_repository
      $> svn commit -m "reverse patch from rev3 to rev2"  #rev4
      $> svn merge -r 2:1 file:///tmp/test_repository
      $> svn commit -m "reverse patch from rev2 to rev1"  #rev5
      

      Original issue reported by flyer

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              subversion-importer Subversion Importer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: