On Tue, Jul 26, 2011 at 02:10:59PM -0700, Mattius McLaughlin wrote: > On 07/19/11 12:04, Mattius McLaughlin wrote: > >Hi All, > > > > I'm encountering some strange behaviour with replacing a symlink > >with a real file in the repository and wanted to know if what I > >was seeing is a bug or whether I'm doing something wrong. I'd > >like to replace the file in one commit, but Subversion objects to > >changing the file type: > > > >% ls -l trunk/memory_ddr3.v > >lrwxrwxrwx 1 mclaughl eng 74 Jul 19 11:51 trunk/memory_ddr3.v -> > >/proj/ddr3/s39/s39a0c2762e5ac7f7 > >% svn status trunk/memory_ddr3.v > >% svn rm trunk/memory_ddr3.v > >D trunk/memory_ddr3.v > >% cp /proj/ddr3/s39/s39a0c2762e5ac7f7 trunk/memory_ddr3.v > >% svn add trunk/memory_ddr3.v > >A trunk/memory_ddr3.v > >% svn status trunk/memory_ddr3.v > >R trunk/memory_ddr3.v > >% svn ci -m "Correcting link" trunk/memory_ddr3.v > >svn: Commit failed (details follow): > >svn: Entry '/home/mclaughl/nobackup/trunk/memory_ddr3.v' has > >unexpectedly changed special status > > > > In case anyone stumbles across this later, the missing step here was > to remove the svn:special property as well as removing the file: > > % ls -l trunk/memory_ddr3.v > lrwxrwxrwx 1 mclaughl eng 74 Jul 19 11:51 trunk/memory_ddr3.v -> > /proj/ddr3/s39/s39a0c2762e5ac7f7 > % svn status trunk/memory_ddr3.v > % svn rm trunk/memory_ddr3.v > D trunk/memory_ddr3.v > % svn propdel svn:special trunk/memory_ddr3.v > property 'svn:special' deleted from 'trunk/memory_ddr3.v'. > % cp /proj/ddr3/s39/s39a0c2762e5ac7f7 trunk/memory_ddr3.v > % svn add trunk/memory_ddr3.v > A trunk/memory_ddr3.v > % svn status trunk/memory_ddr3.v > R trunk/memory_ddr3.v > % svn ci -m "Correcting link" trunk/memory_ddr3.v > Replacing trunk/memory_ddr3.v > Transmitting file data . > Committed revision 20311. > > I'm surprised the client can't handle this automatically, but I > suppose it's a fairly rare use case.
I can reproduce this problem in 1.6.x. I would say it is a bug. It seems to work fine in 1.7, without the need to delete the svn:special property first. There's a minor UI problem though, 'svn status' shows the replace as '~' rather than 'R'.