Reputation: 1345
We have 20 projects in a single subversion repository. We divide these projects into different repositories. (Every project is independent from each other). Is this way best practice? So like this:
repository1
--> trunk
--> branches
repository2
--> trunk
--> branches
repository3
--> trunk
--> branches
repository4
--> trunk
--> branches
Every project must have own repository ? Right?
Upvotes: 0
Views: 136
Reputation: 2304
It depends on your development environment and situation.
In my personal experience at my job, we do a subset of different repositories for entirely different projects (ones that do not have any dependency on projects). However, we also use a "sub-module" type of directory structure when developing a project that has a lot of components to it.
For example, we'll have a core project:
repository1
--> trunk
--> branches
This repo representing a set of functionality that any project that includes this repository can use. Not dependent on any other repositories.
However, I have another repository that I use to develop a bunch of components.
repository2
module1
--> trunk
--> branches
module2
--> trunk
--> branches
module3
--> trunk
--> branches
module4
--> trunk
--> branches
module5
--> trunk
--> branches
MyModules
YourModules
The reason why I use this approach is because these modules can/will be used by each other. For instance Developer A could be working on a new module, module4 inside of MyModules. And in order to get his new module working, he/she needs to use what we refer to as an external to modules 1 and 3. Developer B can be working on a new module as well, module5 inside of YourModules. But he/she needs modules 2 and 3.
By using externals with this method, users are able to essentially setup checkout folders (MyModules and YourModules). So when Developer A checks out MyModules, it will respectively checkout modules 1, 3, and 4. Likewise for Developer B who checks out YourModules with 2,3, and 5. The benefit of this being that all users are still "pointing" to the base directories of modules 1, 2, and 3 while being separate sub-projects of each other.
I know it was a bit wordy, but I hope I helped convey a case usage for both methods in question. :)
Upvotes: 1