[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: OpenMacNews <openmacnews_at_gmail.com>
Date: 2005-12-13 03:19:44 CET

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi william,

thanks for the detailed reply! :-)

> Well, my first suggestion would be to see if there's any way you can
> reorganize your files so that the machine-specific information is all
> collected in a central location.
<snip>

agreed. 100%. which is why, 'til know, i've managed NOT to find myself in this situation ... :-}

> Given that, I understand that it's not always possible to take the best
> option, and refactoring your code base to better organize the
> machine-specific info might not be possible. If that's the case, you
> might try using symbolic links.

hmm ... interesting.

> If you're on a Unix-like platform

yup. OSX.

> (i.e. anything but Windows)

eek! no.

> Then, it would be possible to use
> 'svn switch' to switch the machine-specific directory to a tag specific
> to the machine(s) you want.

...

> If you can't use symbolic links, you might consider writing a script
> that would perform an 'svn switch' on each machine-specific file
> individually. If you do that, though, you'll need to have placeholder
> files in your main branch to perform the switches on. You can't switch
> a non-existent file. For example:
>
> svn switch http://repos/branch/machine_1/file.c ~/working_copy/trunk/file.c
>
> will fail if trunk/file.c doesn't exist.

i need to think abt this. thx for the idea ...

> Another option would be to put the different machine specific pieces of
> information in the same file and use compile or runtime flags to
> determine which gets used in any given instance.

understood. but, alas, not all the files are readily (well, easily anyway) parsed
 by their parent apps ... i suppose i could write .m4 macros, etc.

but the svn-switch + symbolic link appraoch is my evening's though-n-reading.

thanks!

richard

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iEYEAREDAAYFAkOeL8AACgkQlffdvTZxCMZziwCfe0fcn5/A9EqA+eI8TgIPWLbk
wFwAmgKlo9JqcdaK17e5SQYXLSuWw0kT
=mlkH
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Dec 13 03:21:37 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.