user2525204
user2525204

Reputation: 31

How do I add a new folder of files to an existing SVN repository? The option to add does not appear when I right click

I am trying to add a folder full of Robohelp files (with subfolders) to an existing SVN repository. However, when I right-click, the only SVN options I see are: SVN Upgrade working copy, and under Tortoise SVN I see: Repo-Browser, Properties, Settings, Help, About.

What do I need to do to be able to add the new files?

Upvotes: 3

Views: 30317

Answers (4)

Kaloyan Nedyalkov
Kaloyan Nedyalkov

Reputation: 91

I'm not very sure for TortoiseSVN, but in RabbitSVN when you commit current directory, there is window, that shows what changes are made and you can use checkbox to add newly created files. [click][1]

If TortoiseSVN doesn't have such option, another way is to use Command prompt (Windows) or Terminal (Linux). In both cases there are two kinds of situations:

Let's say that your Subversion repository is something like this: svn://example.com/repo/folder1/sub-folder1/sub-folder2/../subfolderN

You can add a new folder or sub-folder or sub-sub-folder in two ways:

A) You download the folder/sub-folder, create a new folder in your LOCAL COPY. Then you enter following commands:

svn add <folder_name>

svn ci -m "Write some log message, what have you done"

Where svn add adds folder to the repository and svn ci commits the changes

B) You can create a sub-folder directly to the svn repository with svn mkdir <path> Example: I want to create a new folder called "TESTS" in

svn://example.com/svn/Project1

I would just type:

svn mkdir svn://example.com/svn/Project1/TESTS -m "Enter some text for the log"

PS: I know that this is very old thread.

Upvotes: 4

loveisbug
loveisbug

Reputation: 411

If you're using Tortoise SVN, you can first create the folder you need, also you can create files you need in this folder, then right click the folder and you should find the "SVN Add..." command to add them(this folder and the files), you can select the ones you want to commit, then commit them.

Upvotes: 0

Pete
Pete

Reputation: 6723

I'm assuming you're using Tortoise SVN. There are a several ways to do it. One way is to browse the repository to the place where you want to insert your new directory and right-click and select "Create Folder". Then right click the folder and check it out to the location where you want it. Then copy the directory of files you want to put into SVN into the folder created by the checkout. Then right click teh folder and select "SVN Commit...".

As an example, let's say I have a directory: C:\MyStuff that I want to put into SVN. First I'd rename C:\MyStuff to C:\MyStuffTemp. Then I'd go to the SVN repository, find the location I want to put "MyStuff" and then create a folder in that location called "MyStuff". I'd then check out MyStuff to C:\ which would create a new C:\MyStuff directory. I'd copy the files from C:\MyStuffTemp into C:\MyStuff, then right-click C:\MyStuff and select "SVN Commit..."

Upvotes: 4

Will
Will

Reputation: 420

With SVN, just enter

svn add <dir>

But it sounds like you're using the tortoiseSVN shell extension? I'd look at the answers to this question., it looks like the same problem you're having.

Upvotes: 0

Related Questions