Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commit symlink into subversion

Tags:

symlink

svn

I'm tring to commit a symlink into subversion, but I get this error when I try to add the actual symlink:

Can't replace 'path/to/symlink' with a node of a differing type; the deletion must be committed and the parent updated before adding 'path/to/symlink'

like image 886
vise Avatar asked Sep 25 '09 16:09

vise


People also ask

Can you commit a symlink to Git?

Git can track symlinks as well as any other text files. After all, as the documentation says, a symbolic link is nothing but a file with special mode containing the path to the referenced file.

Can a symlink point to a directory?

In computing, a symbolic link (also symlink or soft link) is a file whose purpose is to point to a file or directory (called the "target") by specifying a path thereto. Symbolic links are supported by POSIX and by most Unix-like operating systems, such as FreeBSD, Linux, and macOS.

Can symbolic links be executed?

You cannot use a symbolic link to run an .exe file or execute a script file in Internet Explorer 10. Important: The Internet Explorer 11 desktop application is retired and out of support as of June 15, 2022 for certain versions of Windows 10.

Will RM follow symlinks?

No. rm -rf won't follow symbolic links - it will simply remove them.


4 Answers

I read it as - you have to remove the file, commit, update, create symlink, add it, commit.

And my guess is that you're trying to remove the file, create symlink, commit in one go.

like image 107
Michael Krelin - hacker Avatar answered Oct 28 '22 17:10

Michael Krelin - hacker


  1. svn delete x
  2. svn ci -m'blah'
  3. svn update
  4. ln -s blee x
  5. svn add x
like image 22
Jim Lebeau Avatar answered Oct 28 '22 19:10

Jim Lebeau


find . -type l | xargs -i -x svn propset svn:special on {}
like image 2
Yates Zhou Avatar answered Oct 28 '22 18:10

Yates Zhou


The error I got on svn 1.6.11 reads

svn: Commit failed (details follow):
svn: Entry '/path/to/symlink' has unexpectedly changed special status

I fixed it by simply

svn propset svn:special on /path/to/symlink

And then rerunning the commit. Apparently no need to delete, update, etc....

like image 1
Jeff Avatar answered Oct 28 '22 17:10

Jeff