Setting up SVN repositories

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Locked
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Setting up SVN repositories

Post by RobertGonzalez »

Okay, yet another thing I get to learn as part of my new job...

When setting up a repository (or multiples) in SVN, what approach should I take? I have three main web projects that will be using SVN, but there is also a fourth use in mind for storing config files and other files not related to the web projects. Do I want to set up one repo with four directories or four separate repos?
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

My current policy is to have one big incubator repository and then export out projects as the get big and need to be moved to other places/etc. The main difference is revision numbering: access control through Apache is substantially same whether you do four or one.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

The folks I work with think it would be better to have four separate repos for each of the four projects were are versioning. What do you think? So far I have only set up one repo.

Another thing, am I supposed to create the /branch, /trunck and /?!?! directories or do those get created upon creation of the repository? I am such a total newbie at this and I have to have svn working tomorrow morning.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

Depends on how you create the repo... Some clients will create them for you, others they will not, if not, just have a Template Directory structure:

Code: Select all

projectRoot/
   branches/
   tags/
   trunk/
Set it aside somewhere, and use that for the initial import to start off from square one.

Someone more versed in svn may have a better way to automate the task (its not even needed if it's just a repo for classes/configs)...
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

I'd go with separate repositories - separate repos, separate versioning, separate backups. If the projects are linked, maybe I'd fit them in just one but it just doesn't "feel" right to me.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

I agree, separate repositories for each project. It is a little more work configuring them, but the versioning works like you expect it to. And it is easier to turn them on and off as needed.
(#10850)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

As it looks now, we are going to have four projects that are going into svn. From an administrative/maintenance perspective, is that a low enough number of projects to justify having one project per repo?

On another note, when it comes time to push code live, how does one go about that? Is it simply a matter of copying files from the project folder to the production server?
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Depends on how you develop. Generally I'd develop the TRUNK (main development) to a point where it's stable and assessed as production ready, then copy it over to a new Branch which can be maintained separately from ongoing development. If TRUNK development and the Branch share bug fixes, then they can be added as a commit to one, and merged across to the other.

The SVN Book has a wealth of detail on branching and merging. The book is free if you look it up, you can download a PDF copy from http://svnbook.red-bean.com/ .
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I had that open all day yesterday. It was a little difficult for me to follow. Maybe its just that I am used to the wonderful PHP Manual :wink: .

Thanks Maugrim. I'll look into that in a little bit.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Wealth of detail = difficult to follow ;)

On one of your first questions - unless I'm stuck with SF for open source development, I generally keep projects and even sub-projects separated in repos. There's a method of linking them together (if related/dependencies) during an export. Code you use will be exported mind, not checked out - exporting eliminates all those hidden .svn directories.

Good luck with the projects by the way!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Man, I need it. I am slightly overwhelmed with it all at the moment. I still cannot figure out how to set users up so they can check out and commit and the server knows it. And I still have no clue how to attach those headers to the code that is run through SVN, you know like:

Code: Select all

<?php
/**
 * $author: everah
 * $filetime: 2006-09-22
 */
?>
Last edited by RobertGonzalez on Fri Sep 22, 2006 5:07 pm, edited 1 time in total.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

For the headers, it's an operation set up for individual files. The use of "propset" CLI command with svn:keywords is a starting point in the manual. If you have a GUI client it's probably setup in a file's properties tab.

I haven't setup a server in a while - not much help onn setting up users I'm afraid...
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Hey Everah, can we close one of these two topics (the other one being here)? They're starting to bleed into each other and I'm having trouble figuring out whether or not your question was answered or not. I'm quite experienced with SVN, so I can definitely help, but I'm not exactly sure what your problem is right now.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Tell you what, I'll close this one. Setting up the repos is done now anyhow.

The two topics were different in that this one is my ignornace as it relates to setting up repositories. The other thread is as it relates to my ignorance in setting up the server and hitting it with users that are allowed to commit changes.

But to tell you the truth, I wasn't really making sure I was in the right thread when I was posting. That is my mistake and I will be more careful.
Locked