[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[BUG] Directory obstructing deletion of symlink

From: Felix Wiemann <Felix.Wiemann_at_gmx.net>
Date: 2006-03-06 21:11:41 CET

I think that there is a bug in Subversion which is triggered when a
directory obstructs the deletion of a symlink.

I'm using Subversion 1.2.3 (I'm sorry I can't update at the moment) and
APR 0.9.6 on Linux 2.6 (Gentoo).

~/tmp $ svnadmin create testrepos

~/tmp $ svn co file:///home/felix/tmp/testrepos co1
Checked out revision 0.

~/tmp $ svn co file:///home/felix/tmp/testrepos co2
Checked out revision 0.

~/tmp $ cd co1

~/tmp/co1 $ ln -s something mylink

~/tmp/co1 $ svn add mylink
A mylink

~/tmp/co1 $ svn ci -m ''
Adding mylink
Transmitting file data .
Committed revision 1.

~/tmp/co1 $ cd ../co2

~/tmp/co2 $ svn up
A mylink
Updated to revision 1.

~/tmp/co2 $ rm mylink

~/tmp/co2 $ mkdir mylink

# This is OK:
~/tmp/co2 $ svn st
~ mylink

~/tmp/co2 $ cd ../co1

~/tmp/co1 $ svn del mylink
D mylink

~/tmp/co1 $ svn ci -m ''
Deleting mylink

Committed revision 2.

~/tmp/co1 $ cd ../co2

# The "mylink" directory obstructs the deletion of the symlink, but
# Subversion doesn't complain:
~/tmp/co2 $ svn up
At revision 2.

~/tmp/co2 $ svn st
~ mylink

~/tmp/co2 $ rmdir mylink

# This is the bug: Subversion restores the symlink even though it does
# not exist in revision 2.
~/tmp/co2 $ svn up
Restored 'mylink'
At revision 2.

~/tmp/co2 $ ls -l mylink
lrwxr-xr-x 1 felix users 9 Mar 6 19:31 mylink -> something

# This is the bug: Subversion thinks that the symlink still exists in
# revision 2.
~/tmp/co2 $ svn st -v
                2 2 felix .
                2 1 felix mylink

~/tmp/co2 $ svn del mylink
D mylink

~/tmp/co2 $ svn ci -m ''
Deleting mylink

Committed revision 3.

# Subversion committed an empty revision:
~/tmp/co2 $ svn di -r2:3

For private mail please ensure that the header contains 'Felix Wiemann'.
"the number of contributors [...] is strongly and inversely correlated with the
number of hoops each project makes a contributing user go through."      -- ESR
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 8 22:31:45 2006

This is an archived mail posted to the Subversion Dev mailing list.