ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SVN repo inside another SVN Repo

July 21, 2009 1:13pm

Subscribe [2]
  • #1 / Jul 21, 2009 1:13pm

    skattabrain

    155 posts

    I know this is probably a basic and common thing, but my SVN knowledge is lacking. I basically set up unfuddle to allow me to work on several computers and access the same code and to backup my projects. I use update and checkout and that about entails my svn knowledge.

    I’ve created myself a nice little CI Starter Kit, which I plan to use on all new projects. So I’m not copying over backend pages that are essentially the same over all my projects (like authentication).

    I’m looking to place this starter kit into several projects, then later when I change the starter kit, it will pull those changes into the other projects. So I assume, the best practice for this will also involve basically making the application folder the only real folder I put into the SVN.

    So how do I do this?

    Again, total SVn noob ... and yes, I will try to get to reading that manual! 😊

  • #2 / Jul 21, 2009 5:38pm

    put your starter kit into it’s own repo, then check that repo out using ‘svn external’ into any new projects.
    http://svnbook.red-bean.com/en/1.0/ch07s03.html

  • #3 / Jul 21, 2009 8:00pm

    skattabrain

    155 posts

    thank you GSV!

  • #4 / Jul 22, 2009 8:54pm

    skattabrain

    155 posts

    i’m having trouble with this and it’s driving me nuts!

    so i create my “starter kit” which (at this time) is simply CI 1.7.1 and an auth library i wrote plus the controllers and views for this auth pages and user management. i put this into it’s own repo.

    i then create a new repo for a new site i’m working on. it’s empty. i then and the external repo using svn externals and voila ... my new project pulls in the starter kit. i update the original starter kit, commit it, all good ... update my new project and it pulls the changes.

    so i begin adding a new controller into the application directory ... won’t let me commit the changes to the new repo. what i’m i doing wrong? it’s like the ‘starter kit’ directories won’t allow any new files to commit to my new repo ... i see it, but it’s greyed out.

  • #5 / Jul 23, 2009 2:13pm

    skattabrain

    155 posts

    I guess where I am at today is this, if my starter kit contains the latest CI version, and some files that every project needs, how do i link this all up so i can start a new project/repo ... and get to work?

    Because the CI starter kit will already have it’s application directory. So i can’t simply start adding new files inside this application directory.

    Argh ... I’m so confused!

  • #6 / Jul 25, 2009 5:56pm

    marinaccio

    25 posts

    I am working on something similar. Using a customized base/starter kit to build new sites, as well as rewrite old sites. Onto the problem at hand.

    The question would be in your workflow:

    As of now, do you essentially make a copy of you starter_kit, and then start adding models, views, controllers, modules, libraries, etc.? That giving you your base, then adding the required functionality
    for each particular project.

    When updated versions of the CI framework are available, are you looking to just update the base framework
    in one place, then pull it down to all the projects that inherit from it?

    Are you using Modular Extensions or MatchBox for all functionality of your starter_kit?

    Will you be hacking the starter_kit in each project, or is it generic enough to just drop in?

  • #7 / Jul 25, 2009 6:19pm

    skattabrain

    155 posts

    Thanks for helping!

    You know how it is, as developers ... it seems each project has things that always need to be done. I want to keep “all my coding hours” as DRY as possible ... across my clients when possible.

    As of now, do you essentially make a copy of you starter_kit, and then start adding models, views, controllers, modules, libraries, etc.? That giving you your base, then adding the required functionality
    for each particular project.

    Yes

    When updated versions of the CI framework are available, are you looking to just update the base framework
    in one place, then pull it down to all the projects that inherit from it?

    Well yes, but I need the newest CI framework & the starter kit. In my starter kit (which has things like authentication libraries/controllers), I also was thinking of keeping latest version of CI ... but the more I think of it, it’s probably not necessary, so maybe I won’t.

    Are you using Modular Extensions or MatchBox for all functionality of your starter_kit?

    No. An example of what it in my kit, for authentication, I have 1 library file, 1 login page (controller + view) and 1 user management page (controller & view).

    Will you be hacking the starter_kit in each project, or is it generic enough to just drop in?

    Not really sure. My goal for it is to be ready to start adding content pages for my clients. So a client needs a site. I create a NEW repo, pull in the kit, customize the config file that has a couple add on parameters I set, then start making their website (home page, services page ... that sort of thing).

    So should the client need login access to certain pages, all the files and legwork is done, I essentially just link it up.

    So doing a simple “export” is enough to get started. But it’s 1 year down the road ... when I add a feature to the login controller in my starter kit. I want to code it in the starter kit, update that repo. Then ... for the clients I feel that need this feature, I want to do some process that essentially updates their repo and I can commit to their repo and upload the changes to their site.

    It doesn’t have to be automated, but the beauty of using SVN here versus copying would be I get all the files, I won’t forget one.

    Maybe maintaing the start kit is all i need to do ... and i simply copy the files i need over “as i need them”.

  • #8 / Jul 25, 2009 6:42pm

    marinaccio

    25 posts

    No problem. I would really look into using modules (Modular Extensions). That way, in SVN, you got a project with your starter_kit, which only contains these “custom” modules.

    Then you can create all new projects in subversion, run an export to pull in the starter_kit/modules. When you make updates/changes to the starter kit, you just do another export of the starter kit to all the projects that are using that code base. That is if you were to go with modules, and if they would fit into what you are trying to do. It would also keep all the CI code out of the starter kit, allowing you to just version the core modules that you want to reuse in the starter_kit project.

    That should give you what I think you are looking for, correct me if I am misunderstanding.

  • #9 / Jul 25, 2009 6:51pm

    skattabrain

    155 posts

    Are you referring to this? http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/

    I know zippo regarding modular extensions.

  • #10 / Jul 25, 2009 7:15pm

    marinaccio

    25 posts

    Yes. It is actually pretty easy. The same way you write you Model, View, Controller in separate directories in the application directory, but now you write your mvc in a named module, works exactly the same. Also allows you to drop these named modules into any project, given that they are wrote generic enough to begin with.

  • #11 / Jul 25, 2009 9:09pm

    NBrepresent

    19 posts

    Yo Dawg, I heard you like version control, so I…

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases