Reputation: 5
I have setup subversion 1.6.5 on Fedora. I have decided to use a single repository for multiple projects. I have added one project, projA, to the repository. I will have more projects to add to the repository in future.
If I try to add next project with the command 'svn import . file:///path/to/repos' gives svn: File already exists: filesystem '/usr/local/svn-repos/proj-test/db', transa ction '1-1', path '/trunk'. The new projB is being added to the trunk directory of projA.
I have read the section "Adding Projects" in http://svnbook.red-bean.com/en/1.1/ch05s04.html In that book, projects are added at once. But,I would like to add them one by one as new projects become ready to go. What is the proper command and/or how that can be done?
Thanks. Banani
Upvotes: 0
Views: 1223
Reputation: 62914
A repository is just a tree of files. If you wanted to have two projects in one repo (why you'd want this, I'll never understand), you would do the following:
$ mkdir repo
$ svnadmin create repo
$ cd /path/to/projectA
$ svn import -m "importing project A" . file:///path/to/repo/projectA/trunk
$ cd /path/to/projectB
$ svn import -m "importing project B" . file:///path/to/repo/projectB/trunk
go check out your project somewhere:
$ svn co file:///path/to/repo
and you should get a tree like:
repo/
repo/projectA
repo/projectA/trunk
repo/projectB
repo/projectB/trunk
Upvotes: 2
Reputation: 492
Import is only used on an initial import to the repository.
If you want multiple projects in one repository then you can make a directory with directories for each project within it.
Since you have already imported you can make and add directories to your working copy for each new project you need.
Upvotes: 0