svn copy : copy the entire directory to the another directory

2.6k Views Asked by At

I need to copy the entire directory to another URL.

   svn copy http://10.0.3.2:8080/svn/New/trunk/Test http://10.0.3.2:8080/svn/New/trunk/Test7

It's working properly (i.e. entire /Test directory copied to /Test7 successfully at first time).

If I modify some of the files in /Test directory and again copy /Test to /Test7 directory, it will copy the /Test directory under the /Test7 directory like /Test7/Test. If i again try to copy the /Test Directory to /Test7 directory, it shows an error:

svn: E160020: Path 'Test' already exists

But I want to commit the modified files only to the /Test7 directory when I copy at second time. How can I do this?

2

There are 2 best solutions below

1
Lazy Badger On

How can i do this ?

Read docs!!!

If you modify files in WC, related to Test and want to mirror changes into Test7 - you have to use

  • correct workflow
  • correct commands

You can:

  • switch WC to Test7 path and commit
  • switch WC to Test7, update, merge Test into WC, commit
0
cxxl On

You need to delete the old directory first, then copy again.

And - read the documentation, it's really very helpful. svn helpis good as well.