tags:

views:

48

answers:

2

So after our codebase had become unmanageable, we finally decided to set up subversion for a web project I work on with a few friends. We've successfully set up a trunk and branches for each developer. We're working with PHP. What I'm wondering is, is if there's any way to actually view a PHP file's output from within Subversion so that when one of the other developers checks in a change, I can browse to his branch in my browser and then see what the site would look like and test his changes before merging with the trunk? Right now, if I browse to another developer's branch, all I see is the PHP source code in the browser window.

Is this possible without checking out/exporting every time? Are we going about this the wrong way? Any insight is greatly appreciated. Thanks in advance!

A: 

It's usual for everyone in a team to work in the trunk and use branches sparingly when required e.g. branching for a release so that new features aren't added to a release candidate. There is the philosophy championed by other source-control systems that every change is effectively a branch (Git follows this line of thinking). This may suit your way of working more effectively?

However that point is irrelevant to your problem as you seem happy to work in separate branches while using subversion. The real problem here is that your web server isn't correctly configured for the other developers branches. There's no reason that you couldn't browse to their branch and view the PHP output rather than the source. You'll have to figure out why your server isn't executing PHP in these directories

Dolbz
+2  A: 

The usual way is the other way round: You test changes in a live environment, then check them in as defined changesets. Having a live environment somehow directly connected to a repository sounds difficult to do, and wrong to my ears.

A better way of going about this IMO would be testing changes locally, checking them in, and having a deployment mechanism that checks out the latest revision of the application, and installs it somewhere to browse. If your application's configurtation is built well, it's easy to set this up in a way so you can browse specific revisions using different URLs. I would keep this totally separate from subversion though.

Maybe these questions can give some inspiration:

Pekka
+1 — also worth pointing out that a local web server will allow you [@kenny] to test changes by simply updating your working copy or switching to a different branch.
Michael Hackner