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

Switching to temp branch causes "Failed to add file 'fileB.txt': object of the same name already exists"

From: Francois Beausoleil <fbos_at_users.sourceforge.net>
Date: 2004-02-03 14:50:41 CET

Hello everyone !

I believe I found a small bug when creating a temporary branch from a WC.
In my WC, I had added a few files. I did svn copy WCPATH URL, which did
an immediate commit. I then tried to switch to the branch in question.
The added files were still in my WC, which caused problems, because they
were in the way.

I believe SVN should have been intelligent enough to notice that the
files
were the same between the branch and the WC, and should have simply
updated
the admin area to say that the files were freshly copied out of the
repos.

The following recipe exposes the "bug" (sample run at end):
rd /s/q repos wc
cls
svnadmin create repos
svn checkout file:///repos wc
cd wc
md trunk branches tags
cd trunk
echo >fileA.txt "File A's content"
cd ..
svn add trunk tags branches
svn commit --message "Initial repository layout"
cd trunk
echo >fileB.txt "File B's content"
svn add fileB.txt
svn copy . file:///repos/branches/temp-branch --message "Creating
temporary branch"
svn switch file:///repos/branches/temp-branch
svn revert --recursive .
del fileB.txt
svn switch file:///repos/branches/temp-branch

You'll notice that after I delete fileB.txt, the switch correctly occurs.

Does anyone else think this is a bug, or is this "normal behavior" ?

This is on Win2K SP4, SVN 0.37.0.
    
Thanks !
François

============== Sample Run ==============

$ svnadmin create repos

$ svn checkout file:///repos wc
Checked out revision 0.

$ cd wc

$ md trunk branches tags

$ cd trunk

$ echo "File A's content" 1>fileA.txt

$ cd ..

$ svn add trunk tags branches
A trunk
A trunk\fileA.txt
A tags
A branches

$ svn commit --message "Initial repository layout"
Adding branches
Adding tags
Adding trunk
Adding trunk\fileA.txt
Transmitting file data .
Committed revision 1.

$ cd trunk

$ echo "File B's content" 1>fileB.txt

$ svn add fileB.txt
A fileB.txt

$ svn copy . file:///repos/branches/temp-branch --message "Creating
temporary branch"

Committed revision 2.

$ svn switch file:///repos/branches/temp-branch
svn: Failed to add file 'fileB.txt': object of the same name already
exists

$ svn revert --recursive .
Reverted 'fileB.txt'

$ del fileB.txt

$ svn switch file:///repos/branches/temp-branch
A fileB.txt
Updated to revision 2.
Developer of Java Gui Builder
http://jgb.sourceforge.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 3 14:52:02 2004

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.