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

Re: Best way to set things up for subversion, J2EE (tomcat) and JSPs

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-05-02 22:30:50 CEST

Hi. We develop PHP web sites and use Subversion now, so hopefully my
experience will be helpful to you.

On 27.04.2005, at 18:27, Nick Burch wrote:

> One option would be for everyone to check out their own copy of
> everything
> to work on. This would either require us to install tomcat+coldfusion
> on
> everyone's machine, or to be very careful with how paths are used (so
> we
> can have "project" check out as project_nick and project_bob under the
> webroot, with everyone hacking on their own one). The trouble with
> this is
> it'll require lots of setup to get each instance working, and we have
> to
> be careful to use relative paths.

To avoid all this set-up work, and the problems in keeping every
developer's environment synchronized, we have each developer create
their working copies in the public_html directory in their home
directory on the central Linux web server. They can mount this via a
Samba share.

> The other is to check out the code to each developers directory, have
> them
> change it, then commit + have the commit stage push it out to the
> server.
> It means that if a graphics guy is testing some small tweak, he has to
> do
> lots of things to see his change, while now he just saves a change and
> hits refresh in his browser. This would seem to be a big step
> backwards.
>
> I think the reason I'm having issues is because I'm dealing with
> compiled-on-demand code, running under an environment where setting up
> a
> new application isn't always very quick. Subversion seems to assume
> that
> having checked out a working copy, doing something with it and seeing
> if
> it works is quite easy, but that doesn't seem to be the case for me.

By having each developer check out to a directory in public_html, they
can check their work in their working copy by visiting
http://intranet.example.com/~username/project/. When they're satisfied
that their changes are complete and correct (and most definitely not
before!), then they can check it in.

A post-commit hook does an automatic checkout to a centrally-located
working copy, which is only used by Apache to serve essentially the
trunk. So anyone can go to http://intranet.example.com/project/ (this
is set up via an Apache Alias directive for each project) and see the
current trunk, without needing to get a working copy themselves -- this
is great for managers who don't want to mess with Subversion just to
see what the developers are doing. How to set it up:

http://subversion.tigris.org/faq.html#website-auto-update

I have zero experience with JSP... with PHP, there's no "compile"
stage; it's just text files that the Apache PHP module parses
on-the-fly. If JSP is the same, then that's all you'd need to do. If
there's a compilation stage involved, though, then you'd want to modify
the post-commit hook to not only update the central working copy, but
also do the compile.

If you need more info or ideas feel free to ask.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon May 2 22:33:12 2005

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