27
votes

I have a repository where in revision 1 the folders trunk, branches and tags were added. The source was kept in trunk. Revision 7 happened, and development continued up to revision 16. Now I have to continue to work on revision 7, so I want to create a branch off of revision 7.

Here is how I tried to do this: Using TortoiseSVN, I select trunk in the repository browser, open "Show log", select revision 7 and right-click "Create branch/tag from revision". The Copy (Branch / Tag) dialog appears with FROM-URL set to trunk and I enter .../branches/new_branch_name as the To-URL. "Specific revision in repository" is checked and set to 7.

Now I get an error saying "Path ...../trunk does not exist in revision 7". But trunk was definitely created in revision 1 and if I look at the changed files of revision 7 in the "Show log" dialog, I can see that the files are added/modified in trunk.

What am I doing wrong?

4
does branches exist in the repository?Christopher
yes, it does. Was also created back in revision 1.Holgerwa

4 Answers

50
votes
  • Open the repository browser.
  • Go to the root directory of the repository.
  • Click the "revision" button (it says "HEAD") and from the dialogue select the revision in question
  • Right drag-and-drop the "trunk" directory to the "branches" directory and select "Copy and rename item to here".
  • Type in the name of the new directory.
  • Write a log message.
31
votes

enter image description here

  1. Open repo browser
  2. Right click trunk
  3. Choose "Show log"
  4. Right click revision you want to branch from
  5. Choose "Create branch/tag from revision"
  6. Set your To path (e.g. branches/MyBranch)
9
votes

Open the "show log" Dialog and right click a log entry to open the "Create tag/branch"-Dialog.

2
votes

I found a solution:

  • Check out old revision
  • from your working copy, create a branch

It seems that this must be done using a working copy and not directly in the repository (browser).