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

Re: best-practice for organizing sparse/end-user-specific files in a repos?

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2005-12-19 13:15:16 CET

On Dec 12, 2005, at 07:58, OpenMacNews wrote:

> i've a question abt best-practice repos organization of sparsely-
> populated 'machine-specific'
> content.

> say i've a repos of ~ 10000 files, org'd across a hierarchy of ~250
> dirs.
>
> the repos will eventually be checked out to a number of different
> boxes.
>
> while the vast majority of the repos files are to be identical from
> machine to machine, some
> small number, say ~ 1%, contain machine-specific content ... for
> example, a machine name or an
> IP address. these files are somewhat randomly distributed across
> the repos structure.

One way would be to give each machine's file a filename which
includes the machine name. So if you were trying to manage, say,
Apache configurations for two machines, frodo and sam, then you might
have a directory in the repository containing httpd.frodo.conf and
httpd.sam.conf. If you check this structure out on your development
machine, it's then clear what to edit. For use on the production
machines, you would write a small shell script which knows about all
the files in the repository that are named this way and copies them
to their correctly-named counterparts. You would run this script
after checking out or updating the working copy on the production
server. For example, you could run "post-checkout.sh frodo" and the
script would know to copy httpd.frodo.conf to httpd.conf. httpd.conf
itself would be in that directory's svn:ignore property so Subversion
wouldn't complain about it. The post-checkout.sh script should also
be in the repository so that it's versioned.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Dec 19 13:24:22 2005

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.