This is an old revision of the document!


Host your extension on piwigo.org Subversion repository

What is it about?

The extension manager let you publish your extensions, but you still have to manage the source code by yourself. If you want several developers to work on the same extension, you need a code manager like Subversion. Even if you work alone on your extension, Subversion helps you to work with cleaner methods.

Piwigo.org administrators propose you to host your extension code on the same repository, in the "extensions" directory.

The advantages are:

  • your coding activity is more visible
  • you can work in team
  • you work in a cleaner way

Visible activity is good for you as a developer, and for Piwigo as a project because it generates technical activity and shows the project is “alive”.

Piwigo core team will have write access to your extension but other extension contributors won't (unless you ask for it).

If you are interested, please follow the procedure described in this page.

Ask for it in the extension manager

In the extension manager, create your extension. You don't need to add a first revision, juste create the extension. Once the extension created, click on the “Request Subversion Hosting” button.

Within a short delay (the process is not fully automatic, to avoid abuses) you will receive an email with your extension SVN URL and your connection settings. The email should look like this:

Hello Criss,

Your extension has been successfully added to Piwigo Subversion repository.

SVN URL  : http://piwigo.org/svn/extensions/CommentEditor
username : Criss
password : mzuptvijdm

Happy coding,

--
Piwigo.org administration team

Checkout on your computer

Your extension source code is ready for hosting on piwigo.org, the directory created by piwigo.org administrator is currently empty, you have to fill it with your extension source code.

At this point your need a Subversion client. For Windows users, the most common Subversion client is TortoiseSVN (needs Windows to be restarted after install). For Linux users, the “svn” command line tool do the job the perfect way.

First you have to checkout the empty directory that was created by piwigo.org administrators.

In the “plugins” (or “themes”, depending on the type of extension) directory of your Piwigo local installation, in your file browser, right click, “SVN Checkout”. then give the URL provided by email, like http://piwigo.org/svn/extensions/CommentEditor in the preceding example.

Copy files, add to SVN and commit

  • Copy files into the checkout. Select all of them, right-click, TortoiseSVN > Add.
  • Go one level up in your file browser, select the extension directory, right-click, SVN Commit.
  • It's now time to give your username / password provided by email.
  • Don't forget to always write a comment for every commit you make, in english.

You're done, you can see your commit appear in the Piwigo source code online browser Timeline.

The update/modify/commit cycle

If you work in team, you will have to “SVN update” your extension as often as possible.

If you want to add a feature in your extension or fix a bug, modify the files (and/or add/remove files) and commit them. Don't commit files one by one, unless you exactly know what you're doing, you should SVN commit the whole extension directory.

Resources

 
Back to top
dev/host_extension_on_piwigo.org.1315920629.txt.gz · Last modified: 2011/09/13 13:30 by plg
 
 
github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact