Holgerwa
Holgerwa

Reputation: 3460

How to create a branch of an old revision with TortoiseSVN?

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?

Upvotes: 28

Views: 24283

Answers (4)

Luis Perez
Luis Perez

Reputation: 28130

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)

Upvotes: 32

adfsafsdasdfasdf
adfsafsdasdfasdf

Reputation: 91

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

Upvotes: 9

Milen A. Radev
Milen A. Radev

Reputation: 62663

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

Upvotes: 51

Holgerwa
Holgerwa

Reputation: 3460

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

Upvotes: 2

Related Questions