Folder structure with new extension

If you have any 'mechanical' forge related issues/suggestions, pop them in here.

Moderators: RussW, RobInk, ChiefGoFor, facedancer

Post Reply
User avatar
Stian
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat May 20, 2006 7:58 am
Location: Norway

Folder structure with new extension

Post by Stian » Mon Dec 10, 2007 8:23 pm

Hi there!

I've just started writing a new extension for Joomla! 1.5, and thought I would use joomlacode.org for SVN and hosting of files.

My question is how to organize the files at the SVN repository. I use TortoiseSVN.

I have a local installation of Joomla!, and my new extension, which is a plugin and a admin component, is spread all over the the place. I have the plugin in the /plugins directory, the component in the /administrator/components/ and the language files in /administrator/languages.

Is it "correct" to let the root folder of SVN be the root folder of Joomla!, and just commit the files included in the extension? How do I define in TortoiseSVN which files belong to the extension, so that I don't commit the whole Joomla! installation.

I'm a newbie (as you can guess) with this SVN thingy, so please bear with me ;-)

Stian

User avatar
Stian
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat May 20, 2006 7:58 am
Location: Norway

Re: Folder structure with new extension

Post by Stian » Mon Dec 10, 2007 8:26 pm

And another thing: how do I complete reset/delete the SVN repository at joomlacode.org. I would like to do some experimenting back and forth, and then start from scratch. Older revisions still exists if I just delete the files trough the TortoiseSVN repo-browser.

Stian

User avatar
felfert
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Apr 13, 2007 10:37 pm
Location: Ludwigsburg, Germany
Contact:

Re: Folder structure with new extension

Post by felfert » Tue Dec 18, 2007 9:31 pm

Stian wrote:Hi there!

I've just started writing a new extension for Joomla! 1.5, and thought I would use joomlacode.org for SVN and hosting of files.

Same here ;-)

My question is how to organize the files at the SVN repository. I use TortoiseSVN.

I have a local installation of Joomla!, and my new extension, which is a plugin and a admin component, is spread all over the the place. I have the plugin in the /plugins directory, the component in the /administrator/components/ and the language files in /administrator/languages.

Is it "correct" to let the root folder of SVN be the root folder of Joomla!, and just commit the files included in the extension? How do I define in TortoiseSVN which files belong to the extension, so that I don't commit the whole Joomla! installation.


In theory that should be possible but it's quite a hassle to fiddle around with a lot of svn:ignore properties. And what if you decide at a later point that you want try out an SVN checkout of Joomla itself? That would be almost impossible.

I would suggest a different approach:

Use the same hierarchy like a distribution archive. I am doing that here (I'm sticking to my own SVN server for now) and it works quite nice because you simply can put the whole directory-tree into SVN. Provided that you have an extension.xml, you can easily test install/deinstall (using Joomla's install from directory) and nothing gets in your way.

I'm a newbie (as you can guess) with this SVN thingy, so please bear with me ;-)

Stian



I suggest setting up a local SVN and play around with that - this has saved me a lot of time when i started using SVN long time ago.

Oh and a first tip:
1. In your local svn config file, enable autoprops:

Code: Select all

enable-auto-props = yes

and put the following line in the [auto-props] section:

Code: Select all

*.php = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=Date Author Id Revision HeadURL

Do this, before adding/committing any files and you don't need to set all those properties later.

-Fritz

User avatar
felfert
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Apr 13, 2007 10:37 pm
Location: Ludwigsburg, Germany
Contact:

Re: Folder structure with new extension

Post by felfert » Tue Dec 18, 2007 9:38 pm

Stian wrote:And another thing: how do I complete reset/delete the SVN repository at joomlacode.org. I would like to do some experimenting back and forth, and then start from scratch. Older revisions still exists if I just delete the files trough the TortoiseSVN repo-browser.

Stian


Unfortunately on joomlacode this is not possible right now. Normally you would do that by importing an empty svndump, but they don't have this feature yet. (A real pity and the reason why I decided to stick with my own SVN until they implement this feature - just don't want to loose all commitlogs and other meta-info)

Cheers
-Fritz

User avatar
Stian
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat May 20, 2006 7:58 am
Location: Norway

Re: Folder structure with new extension

Post by Stian » Sun Dec 23, 2007 8:52 am

Thank you for your input on this, Fritz! I'll use your guidelines and play around a little more...

S


Post Reply