views:

262

answers:

4

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

+1  A: 

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

Chris Thompson
`export`? are you sure? ;-) `checkout` is the thing you wanted to say ;-)
zerkms
`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.
Sam
Ah you both are totally right, I'm an idiot...I'll clean this nonsense up...
Chris Thompson
+1  A: 

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.

JohnB
A: 

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.

Sam
A: 

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