You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Young, Jason (GE Infrastructure)" <Ja...@ge.com> on 2005/11/14 19:41:56 UTC

Allow users file to be different than repo version

We would like to have a file that users will have on their machine
(web.config) that should be different than the master copy under source
control.  Basically, that file specifies which database to connect to,
and users want to be able to connect to other databases.  However, in
the "master" copy, we need to connect to a specific database every time.

I thought that using "svn:ignore" would do the trick, but it only works
for files.  Also, in theory, that would make it difficult to actually
change the file if we wanted to.

Goals:
------
- Be able to simply get the source files and be able to run the system.
- Not prone to user error

We are exploring the following options, but want to know if anyone has a
better idea how to do it with Subversion:
1. Have another file called "Release.config" that gets renamed to
"Web.config" during the build process.  Only release.config would be
under source control.  Users would have a local web.config that they can
edit as they please.  The only problem is that users would have to copy
release.config to get their local system running.
2. Change web.config locally, but don't check it in.  The problem is
that people will accidently check it in.

You are all awesome.

Thanks,
Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Allow users file to be different than repo version

Posted by Gary Feldman <sv...@marsdome.com>.
Ryan Schmidt wrote:

>
> On Nov 14, 2005, at 20:41, Young, Jason (GE Infrastructure) wrote:
> ...
>
>> 1. Have another file called "Release.config" that gets renamed to
>> "Web.config" during the build process.  Only release.config would be
>> under source control.  Users would have a local web.config that  they 
>> can
>> edit as they please.  The only problem is that users would have to  copy
>> release.config to get their local system running.
>
>
> [snip]
>
> I believe that's generally how people solve that problem. I think  
> it's pretty easy... 

Agreed.  Just one more suggestion:  Instead of using names like 
Release.config and Web.config, which can be confusing as to which one is 
which, use names such as Web.config.in and Web.config.  This is a common 
convention, so that Web.config.in is the original that is checked in, 
while Web.config is the one that is generated from Web.config.in or 
otherwise created and edited.  In addition to be clearer as to which one 
is which, this convention generalizes.  Otherwise, the next time you 
come up with a similar situation, you'll be forced to invent yet another 
name to distinguish them.

Gary



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Allow users file to be different than repo version

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 14, 2005, at 20:41, Young, Jason (GE Infrastructure) wrote:

> We would like to have a file that users will have on their machine
> (web.config) that should be different than the master copy under  
> source
> control.  Basically, that file specifies which database to connect to,
> and users want to be able to connect to other databases.  However, in
> the "master" copy, we need to connect to a specific database every  
> time.

[snip]

> 1. Have another file called "Release.config" that gets renamed to
> "Web.config" during the build process.  Only release.config would be
> under source control.  Users would have a local web.config that  
> they can
> edit as they please.  The only problem is that users would have to  
> copy
> release.config to get their local system running.

[snip]

I believe that's generally how people solve that problem. I think  
it's pretty easy... you either have a script that you run after  
checkout to copy the file and set up the environment in any other  
ways necessary, or you can have the system print out an error message  
if Web.config doesn't exist, explaining what file to copy and what to  
edit.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org