[Techtalk] conceptual CVS

Emma Jane Hogbin emmajane at xtrinsic.com
Fri Jul 18 11:15:39 EST 2003


It sounds like having the central repository on my laptop is a good way to
deal with file versions. At least I don't think anyone thought it was a
horrid idea. ;) If I have a sandbox for each of the sites, how do I deal
with the config files which I need to test the files locally but don't
want to propogate in each of the sandboxes?

For example:
	cfg.php tells the scripts which templates to use
	connect.php tells the scripts which db to connect to

I don't want those files being copied from sandbox to sandbox, but it
would be nice if I could have version control on them and have them
checked into the repository.

On Fri, Jul 18, 2003 at 08:07:49AM -0400, Travis Casey wrote:
> Something that I've done in the past is to use find's ability to find files 
> newer than a specified file, along with GNU tar's ability to take the list 
> of files to archive from a file.  For example, a script like this could be 
> used:

Unfortunately my config files are in the same directory as the script
files. (db connect file is in with the other PHP scripts and there are a
few language-specific interfaces files that are in with the generic
interface files).

My feeling is that it would be easier if I had a script that could publish
targetted files. e.g.
	publish Quiz.php php/Quiz.php
	- scp Quiz.php to atlantis and put the file into the subdir php
	- scp Quiz.php to megatron			"			"
	- scp Quiz.php to xtrinsic			"			"
If the script had a "home directory" set for each of the servers then it
would know where to put the script on the remote server. I have an RSA
public key set up for two of the servers. The third I haven't bothered to
set up, but I also scp to it so I'm sure it'll be possible.

> if you've got a large set of files and most of them don't change often, it 
> can be a lot better than having to copy the whole thing regularly.

I'm usually copying one to five files at a time (rarely more than three
really) from two different directories. The basic structure looks like
this:
	interface files	some are server-specific, some are generic. These are
					the files that pull up a calendar, discussion board
					(etc). They are not the HTML shell files but rather a
					series of if/else statements to pull up whatever info
					is appropriate for the requested URL. e.g. the
					calendar page is: /cal.php/type/YYYY/MM/DD where type
					can be /month/, /day/ or /week/ so there's a
					little script to see which calendar should be
					displayed based on the URL parameters. The system is
					also written so that you could use a different
					language for /month/ and get the interface in that
					language.
	php/			scripts (same for all servers except connect.php and
					cfg.php)
	templates/		server-specific templates
	css/			generic javascript files + server-specific css files

emma

-- 
Emma Jane Hogbin
[[ 416 417 2868 ][ www.xtrinsic.com ]]


More information about the Techtalk mailing list