You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Dan Allen <da...@mojavelinux.com> on 2003/04/12 13:09:28 UTC

use case for config files in repository

I have a question regarding configuration files in a repository.
Assume that I have a configuration file just as log4j.properties or
some database connection configuration file.  Now, this file needs
to be in the repository because it is relevant to the project, but
certain fields in the file change, like username and/or password or
perhaps logfile location based on the computer on which the program
is running.  After I checkout a version of the repository onto a
computer, would there anyway to tell subversion that I no longer
want to consider this file when updating or committing?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"While they're pumping, you're soaking them" 
 -- Speed Loader TV Advert
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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

Re: use case for config files in repository

Posted by Jeff Stuart <js...@computer-city.net>.
On Sat, 12 Apr 2003 08:48:31 -0500 Dan Allen <da...@mojavelinux.com> wrote:
> 
> > >I have a question regarding configuration files in a repository.
> > >Assume that I have a configuration file just as log4j.properties or
> > >some database connection configuration file.  Now, this file needs
> > >to be in the repository because it is relevant to the project, but
> > >certain fields in the file change, like username and/or password or
> > >perhaps logfile location based on the computer on which the program
> > >is running.  After I checkout a version of the repository onto a
> > >computer, would there anyway to tell subversion that I no longer
> > >want to consider this file when updating or committing?
> > >  
> > >
> > 
> > No, you can't do that, but you can do something else: Check in a
> > template for that file under a different name, for example,
> > "log4j.properties.template", and require people to copy it to
> > "log4j.properties" and customize that. You can tell Subversion to ignore
> > that file.
> 
> Of course!  .dist files.  Duh
> 
> Dan

And here's a thought. :)  Also store a .patch file and have a post hook or script that patches the .dist file to create your config file.  I'm going to be setting all that up soon for my content management system that I'm working on creating on top of SVN.


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

Re: use case for config files in repository

Posted by Dan Allen <da...@mojavelinux.com>.
> >I have a question regarding configuration files in a repository.
> >Assume that I have a configuration file just as log4j.properties or
> >some database connection configuration file.  Now, this file needs
> >to be in the repository because it is relevant to the project, but
> >certain fields in the file change, like username and/or password or
> >perhaps logfile location based on the computer on which the program
> >is running.  After I checkout a version of the repository onto a
> >computer, would there anyway to tell subversion that I no longer
> >want to consider this file when updating or committing?
> >  
> >
> 
> No, you can't do that, but you can do something else: Check in a
> template for that file under a different name, for example,
> "log4j.properties.template", and require people to copy it to
> "log4j.properties" and customize that. You can tell Subversion to ignore
> that file.

Of course!  .dist files.  Duh

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Real programmers just hate to get up in the morning, and 
contrary to Ordinary People, they're in better shape as 
it gets closer to nighttime.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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

Re: use case for config files in repository

Posted by Branko Čibej <br...@xbc.nu>.
Dan Allen wrote:

>I have a question regarding configuration files in a repository.
>Assume that I have a configuration file just as log4j.properties or
>some database connection configuration file.  Now, this file needs
>to be in the repository because it is relevant to the project, but
>certain fields in the file change, like username and/or password or
>perhaps logfile location based on the computer on which the program
>is running.  After I checkout a version of the repository onto a
>computer, would there anyway to tell subversion that I no longer
>want to consider this file when updating or committing?
>  
>

No, you can't do that, but you can do something else: Check in a
template for that file under a different name, for example,
"log4j.properties.template", and require people to copy it to
"log4j.properties" and customize that. You can tell Subversion to ignore
that file.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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