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

Re: Managing localized/static branches

From: stv <stvsmth_at_gmail.com>
Date: 2006-04-08 15:34:48 CEST

Ahhh. Yeah, well, I'm new to PHP as well, so thanks for the tip :)
That'll work just fine for what I need now.

I'm still curious as to how one would handle this in a less trivial
example? Say I'm a printer manufacturer, and we have a print utility.
I rebrand my printers with the rebranded software ... is this type of
thing generally handled in #IFDEF code, or via scm?

On 4/8/06, Ryan Schmidt <subversion-2006Q1@ryandesign.com> wrote:
>
> On Apr 8, 2006, at 12:42, stv wrote:
>
> > I would like to use Subversion to manage the production & staging
> > servers for a website (for which I have only FTP access). There are
> > two areas of particular interest for me, but I imagine this is a more
> > generic problem. Personally, I want to change one line in a CSS file
> > and three lines in a db-config file so that my staging site has a
> > strong visual cue and uses a staging database. I imagine that a
> > traditionally installed application with localizations for various
> > sites may have similar needs.
>
> [snip]
>
> > Basically, I think I'm looking for #IFDEF ( ... if I got that right,
> > my C days are getting hazy)
>
> That's how we do it. We leave Subversion out of it completely. No
> need to have a separate branch if all that's ever going to be
> different is these few changes. Much less hassle to keep it all in
> one branch and use your programming language to conditionalize this
> stuff. Our DB connection script says something like:
>
> <?php
> if (IS_STAGING_SYSTEM) {
> define('DB_NAME', 'staging_system');
> } else {
> define('DB_NAME', 'live_system');
> }
> ?>
>
> and the HTML file has something like:
>
> <?php if (IS_STAGING_SYSTEM): ?>
> <link rel="stylesheet" type="text/css" href="staging_extras.css" />
> <?php endif; ?>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Apr 8 15:36:10 2006

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.