[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Using subversion for web development

From: Jan Hendrik <list.jan.hendrik_at_gmail.com>
Date: Wed, 20 Aug 2008 11:17:36 +0200

Concerning Re: Using subversion for web develo
John Peacock wrote on 19 Aug 2008, 22:12, at least in part:

> Robert Dailey wrote:
> > Well reading it helped understand what I must do, but I do not have
> > the know-how to write such a post-commit hook myself. This is a very
> > common thing, it seems, so I'm sure someone else has already done
> > the work. Is there a decent post-commit hook available for this
> > already somewhere that I can use?
>
> I wrote SVN::Notify::Mirror[1] and SVN::Notify::Config[2] specifically
> to handle dynamic website development. Since you are running Linux,
> it should be trivial to setup (it is a complete pain on Windows).
>
> Specifically, I used a development model where:
>
> 1) All active development occurs on trunk which is synchronized
> automatically to a development server (not publicly available);
>
> 2) The production site is automatically synchronized to the latest tag
> which matches a pre-defined regular expression (e.g. RELEASE-\d+).
>
> The developer only has to create a tag that matches the regex and the
> production site switches to that tag (a very fast operation). No
> developer access to the webserver itself is required; the post-commit
> hook does it all.

While this perfectly addresses one downside of automatization
(some commit might be logically complete in itself, but still not yet
intended for the public or even breaking the site one way or
another) one would have to remember the extra step of creating a
tag also for that nasty typo in headline no. 1 one wants to
disappear from public view as quick as possible.

With the support of John and quite a few others I have considered
this automatization repeatedly over the years, coming to the
conclusion I prefer to have some more manual control about what
goes public and when. All right, our web server is hosted outside
and some extra steps would have to come in for more complication
(e.g. rsync), but I think it also depends on what is versioned: if the
versioned part of the website merely consists of the backbone of
templates and scripts while the content is pulled from a database
the decision is likely to be different than for a site with lots of
(static) content also under version control.

Another suggestion would be updating the live working copy at
document root remotely via shell script or as an overnight cron job
(which incidentally could create nightly tags just as well). OTOH
running a script at own discretion wouldn't be any different and no
more work than tagging.

Jan Hendrik

---------------------------------------
Freedom quote:

     We can't expect the American People
     to jump from Capitalism to Communism,
     but we can assist their elected leaders
     in giving them small doses of Socialism,
     until they awaken one day to find that they have Communism.
               -- Nikita Khrushchev,
                  on the political trend launched by Roosevelt's 'New Deal'

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-20 11:16:43 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.