Reputation: 283
Has anyone encountered something like this?
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"
Upvotes: 2
Views: 6302
Reputation: 10687
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)
Upvotes: 2
Reputation: 97349
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.
Upvotes: 10
Reputation: 99993
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.
Upvotes: 0