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

Externals with Branches etc

From: Karl Wagner <kwagner_at_zetex.com>
Date: Thu, 31 Jul 2008 16:44:22 +0100

Hi there

I have a fairly complicated setup with subversion, keeping both source
and binaries, with separate trunk/branches/tags directories for each
project, along the lines of:

  | |
  | |-PROJECT1
  | | |-trunk
  | | | |-dir1
  | | | |-dir2
  | | | | ...
  | | |
  | | |-branches
  | | |-mybranch
  | | | |-dir1
  | | | |-dir2
  | | | | ...
  | |-PROJECT1
  | ... (as above)
  | |
  | |-PROJECT1
  | | |-trunk
  | | |-branches
  | | |-mybranch


Basicaly the src directory mirrors the bin directory in structure. Each
project in source calls in the subdirectories from the binaries as
externals (because our particular development needs them).

However, maintenance of these is a bit of a pain, especialy when it
comes to branches. I was wondering if there was any way to cause
subversion to use part of the current directory name in the externals

Here are the options I have though of so far, but I am unsure how to
implement them.

1) Using a PHP script + Apache's mod_rewrite / mod_proxy to 'override'
the externals definition. I.e. when svn calls for the externals
property, Apache proxy-forwards this to a PHP script which takes the URL
and generates the externals definition automagicaly. How does svn ask
for properties? Is there some documentation on it somewhere?

2) Assign the externals definition to a php script. I.e. svn:externals=
        Dir1 http://mysvnserver/external/PROJECT1/Dir1
        Dir2 http://mysvnserver/external/PROJECT1/Dir2

        Use mod_rewrite / mod_proxy again to redirect these to a PHP
script, which looks at the referer (if svn sets it) to determine the
correct location and return the right files.

3) A pre-commit script which modifies the externals definition on the
transaction before allowing it to complete, or a post-commit which
performs a check out, modifies the externals, and commits. The second
form of this seems very wasteful, as it would end up creating extra
revisions, but I cannot find anything which lets you modify a

4) Teach my users what to do and hope they aren't too lazy... On second
thought scratch that, it'll never work.

These are pretty much in order of preference, but I may have missed a
simpler solution. Any ideas anyone?

Cheers in advance


Zetex Semiconductors - Solutions for an analog world.


E-MAILS are susceptible to interference. You should not assume that
the contents originated from the sender or the Zetex Group or that they
have been accurately reproduced from their original form.
Zetex accepts no responsibility for information, errors or omissions in
this e-mail nor for its use or misuse nor for any act committed or
omitted in connection with this communication.
If in doubt, please verify the authenticity with the sender.


To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-07-31 17:48:18 CEST

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.