If you have this error after tryin a commit, for sure you have replaced a standard file with a symlink or viceversa, haven’t you?
In that case, what you have to do is just svn add <the resource changed> and svn will replace the file with the new one!
Were you already scared
?
Anyway, the correct procedure to replace a real file with a symlink in svn is the following:
- svn remove of the file you want to link
- ln -s <link>
- svn add of the new link

SVN is a great tool but sometimes it becomes a nightmare!
Saluti dalla Puglia
Comment by daniele — January 18, 2009 @ 7:58 pm
Thank you.
Comment by en — July 7, 2009 @ 1:11 pm
svn: Can’t replace ‘neo-freerunner’ with a node of a differing type; the deletion must be committed and the parent updated before adding ‘neo-freerunner’
Time to start moving projects to mercurial. SVN sucks.
Comment by Ivan Ogai — July 14, 2009 @ 12:55 pm
have you had a look at GIT ?
Comment by antonio lorusso — July 16, 2009 @ 12:49 pm
Um, how about reading what it’s telling you to do? The error says ‘the deletion must be committed and the parent updated before adding.’ Is this not perfectly clear? Well, I guess not. So do this:
svn remove neorunner
svn commit -m ‘Removing neorunner file.’
svn update
ln -s whatever neorunner
svn add neorunner
svn commit -m ‘Adding new neorunner symlink.’
Was that so hard? It does suck if you don’t read instructions.
Comment by Ken — November 10, 2009 @ 1:52 am
Hi Ken,
after more than one year, I’m not sure, but I think that svn wasn’t giving such a clear message in some of the previous versions.
Comment by antonio lorusso — November 10, 2009 @ 9:40 am
$ mkdir -p /tmp/svn_test/rep
’
$ cd /tmp/svn_test
$ svnadmin create rep
$ svn co file:///tmp/svn_test/rep co
Checked out revision 0.
$ cd co
$ echo test file a >a
$ ln -s a l
$ svn add *
A a
A l
$ svn ci -m’add file and link’
Adding a
Adding l
Transmitting file data ..
Committed revision 1.
$ rm l
$ cp a l
$ svn ci -m’file replaces link’
svn: Commit failed (details follow):
svn: Entry ‘/tmp/svn_test/co/l’ has unexpectedly changed special status
$ svn rm –keep-local l
D l
$ svn ci -m’get rid of the link!’
svn: Commit failed (details follow):
svn: Entry ‘/tmp/svn_test/co/l’ has unexpectedly changed special status
$ svn add l
A l
$ svn ci -m’file replaces link!’
svn: Commit failed (details follow):
svn: Entry ‘/tmp/svn_test/co/l’ has unexpectedly changed special status
$ svn rm l
svn: ‘l’ is in the way of the resource actually under version control
$ mv l i_have_to_move_this_away_manually_because_svn_sucks
$ svn ci -m’get rid of the link – finally!’
Deleting l
Committed revision 2.
$ mv i_have_to_move_this_away_manually_because_svn_sucks l
$ svn add l
A l
$ svn ci -m’file replaces link, yay
Adding l
Transmitting file data .
Committed revision 3.
Very handy for maintaining vendor branches
But I guess there’s already a bug filed for that long long ago ..
Comment by john — February 16, 2010 @ 9:30 pm
Comment by antonio lorusso — February 16, 2010 @ 11:03 pm
Its a tough situation for svn to resolve cleanly, although more upfront rules like warning that you made the change and saying what to do about it would be good.
antonio, how does git handle changes to/from symlinks when you update a working copy? Does it have an elegant solution?
Comment by sarahg — May 18, 2010 @ 3:12 am
Hi Sarahg,
to be honest, I’ve never been in this kind of situation with git yet but I assume the it should be more clever and just replace the file automatically. If you try and have issues, let me know.
Comment by antonio lorusso — May 18, 2010 @ 11:51 am
In an instance where you don’t want to remove the file and have it re-added you can simply remove the special property from the file by running:
svn pd svn:special
Comment by Ian — June 14, 2010 @ 1:29 pm