Files get to the wrong directory after svn copy

I want to copy the trunk of one project to another, so I use the following command:

svn copy -m "test" (project url) / Trunk / (project url to) / Trunk /

The files ended up in (project URL) / Trunk / Trunk / instead of (project url to) / Trunk / where I want them to go.

Did I do something wrong? What if I want the files (project url) / trunk /? Doing the following does not make sense:

svn copy -m "test" (project url from) / Trunk / (project url) /

+3
source share
5 answers

, ( "", svn, ), , .
, " " "trunk-branch".
http://my/path
:
http://my/path/trunk,
http://my/path/branches/foo
http://my/path/branches/bar

, :
# svn mkdir http://my/path/branches
# svn mkdir http://my/path/branches/foo
# svn mkdir http://my/path/branches/bar
:
# svn copy http://my/path/trunk http://my/path/branches/foo

'trunk' :
# http://my/path/branches/foo/trunk/...

, , :
# svn copy http://my/path/trunk/* http://my/path/branches/foo

mkdir branches/foo, :
# svn copy http://my/path/trunk http://my/path/branches/foo

.

+9

svn copy -m "test" (url of project from)/Trunk/ (url of project to)/, , .

, svn- , - /trunk/ *, .

+1

- , , - . , svn copy , .

0

, desitnation, SVN

, , , .

, svn copy force, svn rm, svn copy.

0

, SVN.

, , , URL- .

svn copy -m "I want a branch man" http://theproject/proj/trunk http://theproject/proj/branches/today

then the chest will be today, and that is what you want. Then when you switch, you will use

svn switch http://theproject/proj/branches/today .

But as you indicated, everything will be different

svn copy -m "I need another trunk yo" http://theproject/proj/trunk http://theproject/anotherproj/trunk

then you will need to switch to the right directory

svn switch http://theproject/anotherproj/trunk .

I use the period in the above examples, but you have to be careful to go to the right place ...

In other words, this is the case with trunk / trunk all the time, but when you look at the repository URL and working directory (use SVNX on OSX or TortoiseSVN on Windows), you will see that this is just your confusion :)

-1
source

Source: https://habr.com/ru/post/1708806/


All Articles