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

"svn cp" too smart about existing directories?

From: Johan Holmberg <holmberg_at_iar.se>
Date: 2006-08-21 15:09:57 CEST

Hi!

When I create a branch or tag I use a command like:

   $ svn cp -mMSG http://HOST/myproj/trunk \
                  http://HOST/myproj/branches/foo

But I just discovered that I can issue the same command two times
without getting an error the second time. The *third* time I get an
error. I had hoped that the second time would give and error.

The explanation seem to be that "svn cp" is "smart" the second time and
detects that the directory "myproj/branches/foo" exist, and then decides
to create "myproj/branches/foo/trunk" instead.

I have looked around and tried different ways to disable this behaviour,
but without any success.

It seems that "svn cp" is using the same tactic as cp(1) on UN*X. But is
this really a good idea? It seems to me that it should be possible to
write a "svn" command in such a way that it *means* the same thing,
independently of how what repository happens to looks like.

( I come to think about rsync(1) that has solved this by having trailing
"/" being significant in pathnames )

Have I missed some way of accomplishing what I want?

/Johan Holmberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Aug 21 15:13:06 2006

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.