25

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'

1
  • 1
    If you are on a legacy system (ie svn version 1.6.x) see below
    – Jeff
    Oct 16, 2017 at 19:14

4 Answers 4

27

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.

4
  • I did delete something earlier that was previously in the place I'm tring to symlink to but I committed my change before trying to add the symlink to subversion.
    – vise
    Sep 25, 2009 at 17:15
  • 4
    "and the parent update". Maybe you need to svn update for whatever reason? Sep 25, 2009 at 17:19
  • 3
    I've edited the update step into my answer for future sufferers. Sep 25, 2009 at 17:29
  • 1
    When removing, a "svn delete --keep-local" might be useful.
    – rob
    Apr 12, 2012 at 14:04
13
  1. svn delete x
  2. svn ci -m'blah'
  3. svn update
  4. ln -s blee x
  5. svn add x
2
find . -type l | xargs -i -x svn propset svn:special on {}
1

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....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.