how to switch folder to symlink in svn

前端 未结 4 908
独厮守ぢ
独厮守ぢ 2021-02-07 14:27

I had a folder that was part of one project in svn, that has been moved to a different folder / repository to be shared between projects. i want to replace this directory in sv

相关标签:
4条回答
  • 2021-02-07 14:42

    In order for subversion to pick up the changes and detect the symlink, you need to first remove the original file, commit the deletion, and then update your repository. After that you should be able to add a symlink without any issues.

    EDIT: This question seems to have been asked before and received some decent feedback. Check it out: Commit symlink into subversion

    0 讨论(0)
  • 2021-02-07 14:48

    The following sets the special property on every symlink and deletes it on normal files/directories. There are various ways to the determine the files to operate on.

    svn_special_files=`svn propget --recursive svn:special | cut -d' ' -f1`
    for i in `find . | grep -v "\.svn" | cut -d'/' -f2-`; do
      is_special=false
      for j in $svn_special_files; do 
        if [ "$j" = "$i" ]; then 
          is_special=true; 
          break; 
        fi
      done
      if [ -h $i ] ; then
        ! $is_special && svn propset svn:special '*' $i
      else
        $is_special && svn propdel svn:special $i
      fi
    done
    
    0 讨论(0)
  • 2021-02-07 14:53

    You could execute command blow to fix this problem.

    svn propset svn:special on /project/wwwdocs/js
    
    0 讨论(0)
  • 2021-02-07 15:01

    You can even try a simple answer of removing culprit file -

    svn remove --force <file>
    

    This is especially helpful for Windows users using SVN cli.

    0 讨论(0)
提交回复
热议问题