Tortoise SVN does not give option to "Add to SVN"
Asked Answered
P

8

7

I've created an SVN repository and added folders and added contents and Committed. No problem.

But when go to add a new folder (the others were on the P:\ drive, now I want to add our website which is on the C:\ drive) but Tortoise doesn't give me the option of Adding a folder. I have no idea why. Help file shows the instructions I'd expect ("right click on the folder you want to add and choose +Add...") but Add... isn't in the menu.

This is TortoiseSVN v 1.6.7.18415 (I'm about to update it but I was able to add folders before so I don't think this is just a bug, I think maybe I'm missing something obvious).

Perigon answered 28/4, 2010 at 1:55 Comment(0)
T
6

You need to connect that folder with the repository before it can be added to subversion. I believe you will need to start by using the "export" option to connect the folder with a particular repository. You will need to checkout the repository to that directory to connect it. Once subversion knows which repository that folder belongs too, you can add subfolders to the same repository with the "Add" command. Just for the record, I imagine this belongs on superuser.com

Tiber answered 28/4, 2010 at 1:59 Comment(2)
export? are you sure? ;-) checkout is the thing you wanted to say ;-)Commeasure
export is used to get files/folders out of subversion but without the extra metadata necessary to do updates or commits--just clean folders/files. export is akin to a one-time checkout with no option to update/commit or anything else.Toowoomba
B
2

Clay,

Add isn't on the menu "TortoiseSVN" right-click menu when you click on the new folder on the C:\ driver because you are clicking on a folder that is outside of the repository. You need to click on a folder inside the repository on your P:\ drive.

I think you need to move the files over to one drive and have everything in one repository/folder.

Braeunig answered 28/4, 2010 at 2:1 Comment(0)
M
2

You need to Enable 'Add' Option in SVN Settings.

  • Step 1: Open your SVN settings.
  • Step 2: Navigate to the context menu section and you will see some
  • Step 3: Check the 'Add' option to include it in the context menu.

This allows you to easily add new files to your version control system directly from the context menu. check the provided image. SVN Settings

If you are using windows 11 then you can see Windows 11 Context Menu. you also have to add the option from there.

If you are using visual Studio then You can install Visual SVN. It will auto add all of the new files.

Further steps:

After adding the "Add" option, you may not find the Add option has appeared in the most intuitive place.

Add option shown missing from TortoiseSVN menu

Ignore the "TortoiseSVN" menu and select "Show more options" instead. You will see "Add" on the resulting menu, like this:

Add option visible after clicking Show more options

Middleweight answered 1/11, 2023 at 13:54 Comment(0)
B
1

The reason Tortoise doesn't give you an "add" option is because the folder you right-clicked on is not located inside an existing working copy. You can do one of two things.

  • Move it inside a working copy. For example if your working copy was at P:\Project and the website you want to add is in C:\Website, you could copy C:\Website to P:\Project\Website (or whatever location under P:\Project where you wanted it added to the repository). Then, when you right-click the new copy, you should see an Add option.
  • Use the Import command. Tortoise will prompt you for the path. Note this is the path of the repository (http://myhost.com/svn/MyProject/Website) not the path of the working copy (C:\Project\Website).
Banka answered 28/4, 2010 at 2:4 Comment(0)
M
1

Make sure the folder you want to add doesn't already have a hidden .svn file in it. For example, it used to be part of another repository. If it has this file, delete it along with any that may be hiding in subfolders. Then right click on the parent folder and see if you can add it.

Mammary answered 28/3, 2013 at 20:59 Comment(0)
H
1

Just do one step as it worked for me. From the P drive where you are doing the normal operations, copy the hidden folder with name ".svn" (in folder options make sure hidden folders are appearing) and paste it inside your C drive folder which you want to add. Now click on this folder you want to add an "add" will start appearing for it.

Hardnosed answered 10/6, 2016 at 10:46 Comment(1)
If even this is not working, checkout something from SVN to your C drive folder. Now copy its hidden svn folder and place it inside the folder you want to add. after placing it will start showing add option.Hardnosed
T
0

Add will only be available on direct subfolders of your working copy folders. It sounds like the folder you want to add is not within your working copy at all. If that's the case, the best solution is to move the folder within the working copy, then it will be available.

Another option is to create the folder, blank, on the repository directory and then checkout just that folder to where you want it. Then you can copy the files in and TortoiseSVN will give you an Add option on the contents.

Toowoomba answered 28/4, 2010 at 2:3 Comment(0)
I
0
  1. Right click folder and select "import..."
  2. URL of Repository: example: file:///SVNRepo/{Your Folder Name}
  3. Click OK (This creates a folder in your repository)
  4. Right click folder and select "SVN Checkout..."
  5. Make sure both the URL of Repository and Checkout Directory end with your folder name
  6. Click OK (This links your local folder with the repository folder)
  7. If your folder is not empty, it's ok, it will not delete anything. Checkout into the non empty folder.

That's it. Now your folder has the .svn file and is linked to your repository. You should have the "Add" option now.

Isar answered 7/6, 2022 at 16:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.