开发者

Problem with svn copy command

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜