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

"svn update" not respecting "add" setting.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • all
    • 0.17
    • libsvn_wc
    • None

    Description

      Howdy,
      
      I'm using Subversion built from r3146.
      
      If I have a repository and two users (u1, u2) check out the same URL to
      their own working copies, then do the following in their respective
      working copies:
      
        o  Each creates a file called "baz"
      
        o  Each "adds" a file called "baz" (now it's marked locally for adding)
      
        o  u2 commits baz
      
        o  u1 tries to commit baz, it fails as it should
      
        o  u1 tries to update baz, it fails until baz is moved out of the way
                  
        o  u1 moves (Unix mv)  baz out of the way and updates the working
           copy. baz  is updated from the repository.
      
        o  u1 tries to commit. The commit fails because baz cannot be added
           to the repository.
      
      According to Karl Fogel the update should not succeed. It should notice
      the 'add' setting for baz and claim a conflict.
      
      The following script illustrates the problem:
      
      #!/bin/sh
      #
      # demonstrate add/update bug with r3146
      #
      svnadmin create `pwd`/repos
        
      mkdir foo
      touch foo/bar
      
      svn import -m'import' file://`pwd`/repos foo foo
      
      svn checkout file://`pwd`/repos/foo u1
      svn checkout file://`pwd`/repos/foo u2
        
      touch u1/baz
      touch u2/baz
      
      svn add u1/baz
      svn add u2/baz
      
      svn commit -m'u2 commit of baz' u2/baz
      
      # This should cause an error (and does)
      svn commit -m'u1 commit of baz' u1/baz
      
      # Now, try to update u1 (without moving baz).
      # Should be an error too
      svn update u1
      
      # So move u1/baz to u1/baz.u1 and try the update again
      # It should work
      mv u1/baz u1/baz.u1
      svn update u1
      
      # Now try the commit again... It shouldn't fail, but does!
      svn commit -m'u1 commit of baz' u1/baz
      

      Original issue reported by jdputsch

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: