Commit symlink into subversion
Asked Answered
C

4

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'

Cini answered 25/9, 2009 at 16:56 Comment(1)
If you are on a legacy system (ie svn version 1.6.x) see belowDiscretionary
C
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.

Cholecalciferol answered 25/9, 2009 at 17:1 Comment(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.Cini
"and the parent update". Maybe you need to svn update for whatever reason?Cholecalciferol
I've edited the update step into my answer for future sufferers.Cholecalciferol
When removing, a "svn delete --keep-local" might be useful.Adequate
U
13
  1. svn delete x
  2. svn ci -m'blah'
  3. svn update
  4. ln -s blee x
  5. svn add x
Urrutia answered 26/2, 2011 at 17:39 Comment(0)
H
2
find . -type l | xargs -i -x svn propset svn:special on {}
Hunks answered 17/10, 2017 at 8:22 Comment(0)
D
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....

Discretionary answered 16/10, 2017 at 19:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.