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

Probably bug with svn copy

From: Robert S. Sfeir <yosemitesam_at_gmail.com>
Date: 2005-04-12 15:34:17 CEST

Folks,

While teaching a subversion class yesterday, we came across an
interesting anomaly with svn copy which I believe is a bug.

Here is how to set it up and reproduce the behavior.

a new repository with the following structure is needed for testing:
  myProject
myProject/tags
myProject/trunk
myProject/trunk/Dir1
myProject/trunk/Dir1/SubDir1
myProject/trunk/Dir1/SubDir1/file1.txt
myProject/trunk/Dir2
myProject/trunk/Dir2/SubDir1
myProject/trunk/Dir2/SubDir1/file2.txt
myProject/trunk/Dir3
myProject/trunk/Dir3/SubDir1
myProject/trunk/Dir3/SubDir1/file3.txt

Once you have the repository buit with this structure, create a tag
of each SubDir1 into tags1 in the tags directory and watch what happens:

svn copy myProject/trunk/Dir1/SubDir1 myProject/tags/tag1

A tags/tag1 (I see that file1.txt is in this directory, which is
what I expect)

svn copy myProject/trunk/Dir2/SubDir1 myProject/tags/tag1

A tags/tag1/SubDir1 (for some reason in this case it creates
SubDir1 with file2.txt in it)

svn copy myProject/trunk/Dir3/SubDir1 myProject/tags/tag1

Fails because SubDir1 already exists.

This behavior is inconsistent, what I expected would happen is either:
1- SubDir1 would be created the first time with file1.txt in it and
fail the other 2 times after it
2- file1.txt, file2.txt and file3.txt would all end up in tag1.

However as you can see by testing it is that the behavior is
different for the first 2 copy commands and the third behaves like
the second. Why is subversion changing its behavior on copy? Should
it not provide some kind of consistency and not take a guess on how
to best copy a directory or directory content?

Thanks
R

Robert S. Sfeir
yosemitesam(at)gmailNOSPAM.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Apr 12 15:39:24 2005

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.