Setting up SVN repositories
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Setting up SVN repositories
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?
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?
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
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.
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:
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:
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)...
Code: Select all
projectRoot/
branches/
tags/
trunk/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)...
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
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?
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?
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
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/ .
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/ .
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
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!
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!
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
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.
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
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...
I haven't setup a server in a while - not much help onn setting up users I'm afraid...
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
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.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
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.
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.