Reputation: 324012
I am trying to create a new branch in Subversion repository with a bit non-standard structure: instead of repo/trunk
there is org/trunk/repo
. The access is available only using HTTPS protocol.
I was trying to create a branch in semi-standard way (note: the command below is redacted a bit)
$ svn copy \
https://svn.example.org/svnroot/ph/org/trunk/repo \
https://svn.example.org/svnroot/ph/org/branches/foo/repo \
-m "Create a 'foo' branch of /trunk/repo"
This command resulted in strange 'path not found' error:
svn: '/svnroot/ph/org/!svn/bc/71/branches/foo' path not found
I don't think it is permission problem, as the following command
$ svn copy \
https://svn.example.org/svnroot/ph/org/trunk/repo \
https://svn.example.org/svnroot/ph/org/branches/foo_repo \
-m "Create a 'foo' branch of /trunk/repo"
succeeded
Committed revision 72.
What might be the cause of this problem? How can I work around it?
Subversion server is at version 1.6.19 (r1383947), subversion client is 1.6.17 (r1128011).
Upvotes: 3
Views: 10015
Reputation: 11
Make the target directories in working copy, 'add' them, commit, then do the svn copy. Worked for me.
Upvotes: 1
Reputation: 29735
By default you can not create intermediate directories on the fly. There is the --parents switch to do this. So the correct command should be:
svn copy --parents \
https://svn.example.org/svnroot/ph/org/trunk/repo \
https://svn.example.org/svnroot/ph/org/branches/foo/repo \
-m "Create a 'foo' branch of /trunk/repo"
Upvotes: 18
Reputation: 12266
When you first create the repository, you ran "svn mkdir branches" to create the branch folder. It stands to reason that you need to run a mkdir command to make foo before you can create a branch to that (currently) non-existant folder. Have you tried that?
Upvotes: 1