I know people who use branching as you do (on the root of the
repository tree) instead of branching for each project. When you use
Subversion 1.5 or greater, you can use relative paths instead of
having to specify the full external path name. This allows you to make
sure externals use the same branch as your project.
See about 2/3rds down this page:
<http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html>
Will that help you?
Otherwise, you will have to manually maintain your svn:external
definitions. However, I do have a pre-commit trigger that might help.
This hook script allows you to force the setting of properties on
particular files, and that would include svn:externals. You specify
files, the properties, and the value for that property. However, you
can use regular expressions for both the file name and the property
value which greatly simplifies the maintenance.
When you do a branch, you setup via the control file the correct
branch and revision you want this hook script to enforce for your
externals. This won't automatically change the values of your
externals, but it will make sure any new changes follow your
requirements.
In fact, it could be a great way to make sure you've hit all of the
externals that must be changed. You setup the new branch in the
control file, do the branch, modify the externals, and then try
committing it. If you accidentally missed an external that needed to
be set, this will point it out to you.
The hook script is available at <http://dl.getdropbox.com/u/433257/hooks.zip>.
On Thu, Mar 12, 2009 at 10:25 AM, max <iprmaster_at_gmail.com> wrote:
> [I have already tried to post this message two times, but it always appeared
> as attachment. I hope that this time it will properly work.]
>
> Hi everybody,
>
> I have a problem on how to handle svn:externals in case of repository
> branching.
>
> Let suppose I would like to have a repository structure like this:
>
> - repository root
> ...trunk
> ......dir1
> ......dir2
> ......dirExt1 svn:externals -> https:/path/to/an/external/repository
> ......dir3
> ......dirExt2 svn:externals -> https:/path/to/another/external/repository
> ...tags
> ......v20090101
> .........dir1
> .........dir2
> .........dirExt1 svn:externals -r12345 ->
> https:/path/to/an/external/repository
> .........etc.
> ...branches
> ......ourDev_20090101
> .........dir1
> .........dir2
> .........dirExt1 (??)
> .........dir3
> .........dirExt2 (??)
>
> My needs can be summarized as follows:
>
> 1) in trunk the svn:externals definitions should *always* point the HEAD
> versions of the external
> repositories -> AFAIK this is automatically done if I define "unversioned"
> svn:externals
>
> 2) in any tag versioned svn:externals definitions have to be set: I have
> just
> discovered svncopy.pl, so this is not an issue either :D
>
> 3) now the challenge: if I define a branch (i.e. ourDev_20090101), I would
> like
> that some/all svn:externals definitions are replaced by actual directories
> on *our* repository. On other
> words, once I have branched our repository, the development of dirExt1
> dirExt2 has to continue on *our* rep.
> No references to external repositories should then appear. However, it would
> be nice if later a merge back to them would be possible ;-)
>
> Vendor branches may represent a solution, but they make more sense if you
> stick your whole development to a stable version of the external libraries
> (like in the example
> given in the SVN-documentation).
>
> I am wondering it there exists a smarter solution... Do you know one?
>
> Thanks,
> Max
>
>
--
--
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1313662
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-03-12 18:20:37 CET