开发者

Problem with svn copy command

开发者 https://www.devze.com 2022-12-29 13:23 出处:网络
Has anyone encountered something like th开发者_JAVA百科is? I was expecting file.txt to be inside \"testbranch/src/\" folder after executing the command written command. But I get entry at \"testbranc

Has anyone encountered something like th开发者_JAVA百科is?

I was expecting file.txt to be inside "testbranch/src/" folder after executing the command written command. But I get entry at "testbranch/src" to be a file type rather than directory type! In Web browser if I look under src folder of testbranch, it shows file contents of file.text.

svn copy "https://repos/svn/myrepo/trunk/src/file.txt" "https://repos/svn/myrepo/branches/testbranch/src/" -m "Testing"


If you are are using SVN 1.6.X you can simple do it like the following.

svn copy --parents "https://repos/svn/myrepo/trunk/src/file.txt" "https://repos/svn/myrepo/branches/testbranch/src/" -m "Testing"

The --parents will create intermediate folders.


Can you do:

svn copy https://repos/svn/myrepo/trunk/src/file.txt https://repos/svn/myrepo/branches/testbranch/src/file.txt -m "Testing" --parents

(i.e. why not use the filename in the destination path? that will give you the behavior you're looking for)


If the output directory didn't exist before you ran the command, this is just what you would get. Just as you would with the plain 'cp' command on Linux. You needed to do an svn mkdir of the src directory on the output side first.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号