Creating a Subversion branch

柔情痞子 提交于 2020-03-06 03:24:06

问题


I have a Subversion repository (running SVN 1.6.6) on an Ubuntu Linux server, and I'm trying to create a branch using the TortoiseSVN GUI; However, I get an error back:

COPY c:\work\repositoryWorkingcopy\ to http://svnserver/svn/repository/Oct13, Revision HEAD

Error '/svn/repository/!svn/bc/234/branches' path not found

I logged into my Linux box to see if the "branches" folder was NOT available. However, I could see that /var/svn/repository/branches existed.

So, what's the problem and how do I fix it?

I tried the following command (as per http://svnbook.red-bean.com/en/1.1/ch04s02.html#svn-ch-4-sect-2.1) as well as from the command line and got a similar error:

c:\workingcopy> svn copy http://reposerver/svn/repository/ http://reposerver/svn/repository/branches/BFI_Oct13/ -m "Creating a branch"

svn: '/svn/repository/!svn/bc/235/branches' path not found

What should I do?

Also, svn info on the main directory of the working copy gives the following information.

Path: .
URL: http://reposerver/svn/myrepository
Repository Root: http://reposerver/svn/myrepository
Repository UUID: 7a31d3c0-b288-4695-aecd-3f9dda2861ab
Revision: 235
Node Kind: directory
Schedule: normal
Last Changed Author: anjan
Last Changed Rev: 235
Last Changed Date: 2010-10-13 20:39:31 +0530 (Wed, 13 Oct 2010)

回答1:


When you say:

I logged into my Linux box to see if the "branches" folder was NOT available. However, I could see that /var/svn/repository/branches existed.

Do you mean that the actual directory exists in the filesystem (which will do you absolutely no good), or that it exists in the repository?

Possible fix:

$ svn mkdir http://reposerver/svn/repository/branches
$ svn copy http://reposerver/svn/repository/ http://reposerver/svn/repository/branches/BFI_`date +%b%d`/ -m "Creating a branch"



回答2:


Generally speaking, you'll want to branch on the server, make your changes in the branch, and check those changes in.

So, the first step is to create the branch, which is just a copy command. In TortoiseSVN, you need the URL to (presumably) the trunk, and you'll need to define the URL of the branch. In a more standard repository setup, the trunk might be http://svnserver/svn/repository/trunk and your branch might be http://svnserver/svn/repository/branches/Oct13.

Then, you'll want to switch your working copy to the branch. You should have the option to do so without losing your local changes.

Finally, you would check your changes in, and they should go to the branch from there.

I'm more accustomed to the command-line interface for SVN, but I have used TortoiseSVN. It's been a while, though, so leave a comment if you still have trouble or this doesn't make sense.



来源:https://stackoverflow.com/questions/3925329/creating-a-subversion-branch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!