Esteban Küber
Esteban Küber

Reputation: 36832

How do you arrange several projects in a single SVN server?

When having several related projects (identifiable, stand alone applications, that share libraries), how do you prepare your SVN server directory structure? By branch > project? By project > branch? Something entirely different? Or is it better to have one SVN server for every project? (Take into account that some projects are intimately related)

Upvotes: 1

Views: 506

Answers (9)

markh
markh

Reputation: 793

As someone who maintains large svn repos, let me tell you, DO NOT use a unified trunk. It will make all operations much, much slower. Beyond this, extracting a single project out of a larger repo is not only tedious and touchy, but will result in a space waste when you do eventually want to peel away even one project.

Use separate repos for each project, with a trunk and tags directories under the repos, and have developers needing to tie to other projects use externals, the way they were designed.

Lazy is not an adequate substitute for organized.

Upvotes: 1

bkritzer
bkritzer

Reputation: 1416

I'd look into using externals . If you have many related projects that all use the same codebase, but you don't want to copy that codebase into each repository, set up an external link in each repository to point to the common codebase.

Upvotes: 2

Hank Gay
Hank Gay

Reputation: 71939

The standard convention is

  • project1
    • branches
    • tags
    • trunk
  • project2
    • branches
    • tags
    • trunk

inside a single repo. Since that's the most common convention, some tools just expect your projects to be laid out like that.

Which projects belong in which repo is more of a judgement call. Personally, I'd start with one repo for all projects managed by the same group, e.g., team, division, or company.

Upvotes: 10

Kevin Peterson
Kevin Peterson

Reputation: 7297

This question gets a whole section in the SVN book. I would recommend starting there, and asking about anything it doesn't make clear or is specific to your project.

Upvotes: 2

Matthew Vines
Matthew Vines

Reputation: 27561

Check out the subversion book, which offers a section on Recommended Repository Layout

Upvotes: 7

JSBձոգչ
JSBձոգչ

Reputation: 41378

For projects that are intimately related, I recommend:

root > branch > project

This way it's possible to check out a single branch and get all of the code that's current in that branch.

Upvotes: 1

NikolaiDante
NikolaiDante

Reputation: 18639

  • root / trunk / projectfolders

  • root / branches / projectfolders

That way someone can get all the mainline projects without getting any branches if so desired.

Upvotes: 1

Mat Nadrofsky
Mat Nadrofsky

Reputation: 8264

We've setup repositories for each project, thus each can have their own branches/tags etc.

Also, for interdependent projects, you can setup linked repositories so that the files can be shared. This has worked well for us so far and has proven to be quite flexible.

Upvotes: 0

Dan Lorenc
Dan Lorenc

Reputation: 5394

I use a folder for each project, then branches within each folder. This way if a different team is working each project, they don't need to see the whole tree, just their branch.

Upvotes: 0

Related Questions