简体   繁体   中英

How can I solve svn error: “E200007: Cannot mix repository and working copy sources”

I looked here for this issue, and none of the solutions pertain to me. The issue reported by other folks had a backslash in their command line, which I do NOT have. In my case, I'm trying to make a branch off a branch, so I did this:

- Existing branch: https://mysvn.repo.com/project/branch
- Created https://mysvn.repo.com/project/branch/private_branches folder in TurtoiseSVN explorer
- Tried svn cp -m "My private branch" https://mysvn.repo.com/project/branch https://mysvn.repo.com/project/branch/private_branches/my_private_branch

I get error in posts's title. Any pointers please?

The command line is not seeing this as two URL's. Perhaps you have space in the URL, in which case you should encode that as %20 instead of entering a space? Here is an example I just did using same syntax as you:

$ svn cp -m "Test branch" http://oneeight.tigris.org/svn/oneeight/trunk http://oneeight.tigris.org/svn/oneeight/branches/mptest1
Committed revision 24.

Had the same problem when issuing the SVN command from a script via a variable:

cmd=svn cp [...]
$cmd

The workaround I found is to issue the command directly from the script:

svn cp [...]

Perhaps this works for you/others as well.

I had the same problem and the solution was avoid using spaces in the message. In my case it was because I was running the command on a grid and it gets wrapped automatically by a script that has some problems with spaces and double quotes.

Worked for me:

-m "My_private_branch"

Hope it works for you too.

PS: Haven't tried it but maybe -m 'My private branch' with single quotes does work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM