You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Gavin Baumanis <ga...@thespidernet.com> on 2011/09/20 00:29:05 UTC
Ignore development changes.
Hi Everyone,
I am just after some advice on how other people solve the following issue.
I have a committed file.
When it is deployed, it needs to be in a state (lets call it state 1)
While testing code locally, it needs to be in some other state (state 2)
Short of altering the code to read like;
if on dev server
have state 1
else
have state 2
fi
How can I have a local change,
but have "that" change temporarily ignored?
My initial thought is to use the svn:ignore
But that brings about the issue of, out of mind out sight... and if I ever need to do "real" changes to that file, they won't be picked up in svn status.
The answer is quite likely not even a SVN once - but perhaps a procedure / system one.
I am open to any and all suggestions of how people might solve this issue for themselves already.
And as always - thanks for any ideas you might have.
Gavin "Beau" Baumanis
Re: Ignore development changes.
Posted by Geoff Hoffman <gh...@cardinalpath.com>.
The way we do it is:
svn:ignore filename.ext
filename.local.ext
filename.stage.ext
filename.prod.ext
On local make a symlink to local version:
ln -s filename.local.ext filename.ext
On staging make a symlink to stage version:
ln -s filename.stage.ext filename.ext
On prod, make a symlink to prod version:
ln -s filename.prod.ext filename.ext
Our build scripts do the 2nd and 3rd automagically at deploy.
HTH -
On Mon, Sep 19, 2011 at 3:29 PM, Gavin Baumanis <ga...@thespidernet.com>wrote:
> Hi Everyone,
> I am just after some advice on how other people solve the following issue.
>
> I have a committed file.
> When it is deployed, it needs to be in a state (lets call it state 1)
> While testing code locally, it needs to be in some other state (state 2)
>
> Short of altering the code to read like;
> if on dev server
> have state 1
> else
> have state 2
> fi
>
> How can I have a local change,
> but have "that" change temporarily ignored?
>
> My initial thought is to use the svn:ignore
> But that brings about the issue of, out of mind out sight... and if I ever
> need to do "real" changes to that file, they won't be picked up in svn
> status.
>
> The answer is quite likely not even a SVN once - but perhaps a procedure /
> system one.
>
> I am open to any and all suggestions of how people might solve this issue
> for themselves already.
> And as always - thanks for any ideas you might have.
>
>
> Gavin "Beau" Baumanis
>
>
>