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

"svn update" fails to remove folder that still contains ignored files

From: Markus Kuhn <Markus.Kuhn_at_cl.cam.ac.uk>
Date: Fri, 20 Nov 2009 13:55:13 +0000

I'm not sure whether this is a bug report or a feature request:

Very sensibly, "svn update" does not remove any folder that still
contain files that are not under version control. However, I was
surprised to find out that this even applies to *ignored* files.

Shouldn't svn update be at liberty to destroy any ignored files located
in a folder that it is about to remove?

Aren't ignored files those that are by definition unimportant or easily
remade?

The following shell lines demonstrate this (to me) unexpected behaviour:

# Test whether svn update deletes ignored files correctly before
# removing a directory -- Markus Kuhn -- 2009-11-20
#
# This test fails on svn 1.5.7 under Linux :-(
#
# paths used
repos=`pwd`/testrepos
url=file://$repos
workdir=testwd
#
# create a repository containing folder a/ and check it out
svnadmin create $repos
svn mkdir -m '' $url/a
svn co $url $workdir
# create in $workdir a file a/ignoreme and add it to svn:ignore
touch $workdir/a/ignoreme
touch $workdir/a/ignoreme~
svn status $workdir/a
svn propset svn:ignore ignoreme $workdir/a
svn commit -m '' $workdir
# test that it is ignored now
svn status $workdir/a
# now remove a/ and test whether ignoreme gets removed as well
svn rm -m '' $url/a
svn update $workdir
echo Expected result: the directory $workdir/a should now have disappeared:
ls -laR $workdir/a
[ -e $workdir/a ] && echo "FAILED: svn update didn't remove $workdir/a/ignoreme"
[ -e $workdir/a ] || echo "SUCCESS: svn update behaved as it should"
rm -rf $repos $workdir # cleanup

Desired behaviour: the presence of ignored files in a folder should not
keep "svn update" from removing that folder (unless the user asks
explicitely with "svn update --no-ignore" not to ignore such files).

Any views on the suggested behaviour or suggestions how to achieve it?

Markus

-- 
Markus Kuhn, Computer Laboratory, University of Cambridge
http://www.cl.cam.ac.uk/~mgk25/ || CB3 0FD, Great Britain
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2420674
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-11-20 14:56:11 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.