tags:

views:

96

answers:

3

I have made a joomla component that I want to put on SVN. The problem is that Joomla components have bits and pieces scattered all over the place. What is the best way to handle this with SVN considering I still want to be able to version the application, without including all the core joomla code website code?

UPDATE

I ended up using symlinks in Window 7 like Linux has

http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/

And a nice utility for making linking really easy http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

You can have the project exactly as you would have it in the installer and link the directories and language files to their respective place in the Joomla hierarchy. This also allows you to have multiple Joomla version installed and using a single repository your can test them all! Works great :)

A: 

One way of doing it would be to create the necessary empty directory structure and place your custom files in there.

Daniel Egeberg
A: 

Your Joomla component should be largely self-contained. In some cases you may have a library but really the only people who should creating libraries are if you have multiple components, plugins, and modules that need to share code.

Version the com_mycomponent folder - everything you need should be that folder. If you have files scattered all over the file system then there's a problem with your component design.

EDIT - Also, I've found its easier to version the entire Joomla installation. As the number of extensions you've written goes up, this reduces the number of folders you need to hunt down and click "commit"/"update". Version your entire site, and that way you can just commit the entire thing in go.

Jarrod
Hi, yeah maybe I was being a little dramatic about the all over the place comment. What I mean was that I have two different Language files and the the admin and client component. I might go the full site route though as you suggested.
jax
+1  A: 

This is how I organise my component files within my svn. Assume that my component name is comname.

repository/components/comname/trunk/

comname
comname_admin
com_comname.xml
com_comname-1.0.zip
license.txt
comname_userguide.doc
comname_userguide.pdf

All your front end code should be in comname folder while all your admin code should be in comname_admin. This is the standard way in which to layout a Joomla component structure.

You can then tag your versions and keep them in repository/components/comname/tags/1.0 for example.

Hope that helps. Cheers

Martin
This look pretty good but how do you go about developing locally? For example on your local server do you use the apache alias directives to refer to the component and admin sections?
jax
Well if you developing on Linux you could use sym links to those directories to place the admin and front end folders in your joomla directory structure. I work in Windows though and I develop in my own way and when I'm happy with my work and ready to checkin then I copy those necessary files across to my SVN checkout and then checkin.
Martin