3

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).

3 Answers 3

18

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" 
Sign up to request clarification or add additional context in comments.

Comments

1

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?

Comments

1

Make the target directories in working copy, 'add' them, commit, then do the svn copy. Worked for me.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.