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

invalid symlink created, causes abort on checkout

    XMLWordPrintableJSON

Details

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

    Description

      Creating a new symlink under some circumstances results in a repository that
      cannot be checked back out.  A checkout aborts with the following error:  
      
        svn:  In directory  'test123/trunk/install_system'
        svn:  Can't change executability of file
      'test123/trunk/install_system/VERSION.sh':
            No such file or directory.
      
      A dump of the repository shows the addition of the "executable" attribute which
      is not applicable to a symlink and causes an error on checkout:
      
      Node-path: trunk/install_system/VERSION.sh
      Node-kind: file
      Node-action: add
      Prop-content-length: 59
      Text-content-length: 18
      Text-content-md5: e82b705f0e89ad0996f1d8345a272c30
      Content-length: 77
      
      K 11
      svn:special
      V 1
      *
      K 14
      svn:executable
      V 1
      *
      PROPS-END
      link ../VERSION.sh 
      
      Removing the 4 lines starting with K 14 and re-creating the repository from the
      dump file fixes the problem.
      
      This was originally created when I added a script, then removed it, then turned
      it into a link all before checking in (I seem to remember having to do a --force
      at least one time when dealing with this script).   The problem seems to be on
      the initial creation of the symlink and the executable part seems to be a
      leftover attribute from when I initially was adding a file.
      
      Basic steps to reproduce:
      
         touch new_file
         chmod +x new_file
         svn add  new_file
         svn rm --force new_file
         ln -s some_old_file new_file
         svn add --force new_file
         svn commit -m "added new_file as symlink"
      
      A sample set of scripts were mailed to the user's mailing list as crash1.tgz.
      
      I would recommend fixing in at least two places:
      
      1)  where the file gets created, if it is a symlink don't set executable....
      2)  when checking out, if trying to set a symlink executable, print a warning
      (audit?) but don't die.... 
      
      Please reference the user's list thread, subject:  
          repost:  "No such file or directory" on checkout leaves locks....
      

      Original issue reported by daswadester

      Attachments

        1. 1_2150.recipe.sh
          1 kB
          Subversion Importer

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: