Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Should we use subversion as an update / module system?


Reply


7 Posts   2429 Views

Avatar
Sam

Administrator, 685 Posts

2 February 2007 at 11:41am

Hi all,

Something we're going to want to do in v2.1 is include some sort of facility for:
* Upgrading your version of SilverStripe
* Installing add-on modules
* Upgrading those add-on modules

A slightly unorthodox, but potentially very good, solution is to use Subversion. Basically, what we would do is leave all the .svn files in the published release, set to check out a particular "tag" of the code.

If people wanted to upgrade from v2.0 to v2.1, we could just call the appropriate "svn update" command. Similarly, for installing add-on modules, we could call the appropriate "svn checkout" command.

This approach has the following advantages:

* All the code for downloading releases and maintaining a repository of those releases comes out of the box, including incremental downloads.
* It will be very easy for people to switch to a "nightly build", as releases will come straight from our version tracker. This could help grow our testing community, and mean that people can access the "bleeding edge" features if they want them.
* If people make changes to core files on their system, upgrading won't overwrite them. This is a big pain with other open source systems I've used - you very often wind up need to tweak a file or two to get it working well in your environment.

What do people think?

Avatar
Alex

Community Member, 6 Posts

3 February 2007 at 12:43am

I'm all for it.

Avatar
DrSlump

Community Member, 2 Posts

4 February 2007 at 2:55am

I think it's very risky. Sure that subversion is a powerful tool but with its power comes a great amount of complexity.

My take on this is to add a simple tool to import/export a site from a SilverStripe installation, a simple .zip file with a manifest file would do. This should include a DB dump and the files (templates, code, assets) related to the site.

This would allow to set a pre-production server for testing and then import the site on the production server when all the development is stable.

Avatar
Sam

Administrator, 685 Posts

4 February 2007 at 11:10am

I spoke with a couple of developers about this - the biggest problem we could see was getting subversion installed on all servers that use SilverStripe.

We came to the conclusion that for most people it's a bit of overkill, and a ZIP download based system (well, .tar.gz based :-P) would be a better solution for most people. This will be arriving with version 2.1.

The other thing we are considering is, if you choose to install subversion yourself, giving you the option of upgrading via SVN. This would be useful for developers who want to do testing on the latest branches: install subversion and then get going!

The simpler solution is just to get a public-access SVN server going. This is also on the way.

Who on the discussion forum would be interested in accessing the latest SilverStripe, fresh from subversion? What would you want to use it for?

Avatar
SamV

Community Member, 3 Posts

6 February 2007 at 4:23pm

Interesting idea, but if you really want to launch your code base into a new ionosphere, consider using something distributed.

I'd suggest starting with one of the best - http://bazaar-vcs.org/

Also if you .zip up the svn tarballs, your .zips will be twice the size they need to be.

Avatar
Sam

Administrator, 685 Posts

8 February 2007 at 5:29pm

Thanks for the link to Bazaar VCS, Sam. It looks interested, although we've only recently switched from CVS to Subversion and I'm not sure if we can face going through that again! ;-)

The other thing is that Bazaar VCS seems to have fewer tools that support it. I can't find an Eclipse plug-in, for instance. It's also still in beta.

Do you think that there would be a way of getting the main benefits of Bazaar using subversion?

You're right about zipping tarballs - I would imagine that we'll use tar.bz2 or tar.gz.

Avatar
Enlightened_One

Community Member, 18 Posts

10 February 2007 at 9:34pm

Edited: 10/02/2007 9:35pm

Subversion documentation released under the creative commons artistic license.
########################################################
http://247365.cyborgspiders.com/~mhades/htdocs/secure80211/subversion-how2/svn-book.html
########################################################
Would subversion be useful? That depends on the number of people contributing code. I am in favour of a nightly builds tarball. The concept of SilverStripe updating itself is interesting. Perhaps this would best be solved with the PHP cURL libary? Using the cURL library could create updater code that is BSD licensed. I believe there is room for the development of PHP based software that would provide remote updates.

http://ca.php.net/curl