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

Re: Question about auto commit

From: Itamar O <itamarost_at_gmail.com>
Date: Mon, 19 Apr 2010 11:09:40 +0300

The SVN solution for this use case svn:externals ([1]).
Basically, you would have a single instance of module_1234:
/share/module_1234
and in each project you use that module,
you define the svn:externals property to point to that module:
/project1/trunk - svn:externals = ^/share/module_1234 module_1234
similarly for project2.

This way, when developers checkout either trunk,
they automatically get a copy of the shared module in their working copies.
Just make sure you read the details in [1] for possible gotchas
(like specifying revs and committing the externals separately)

Itamar.

[1] http://svnbook.red-bean.com/nightly/en/svn.advanced.externals.html

On Mon, Apr 19, 2010 at 10:41 AM, <jacek_at_smars.pl> wrote:

> hello
>
> I have a situation, where there are two(or more) projects with its trunks,
> and some modules in these trunks are the same:
>
> /project1
> /project1/trunk
> /project1/trunk/module_123
> /project1/trunk/module_1234
> /project1/trunk/module_12345
> /project1/trunk/module_4567
>
> /project2
> /project2/trunk
> /project2/trunk/module_23456
> /project2/trunk/module_1234
> /project2/trunk/module_789
> /project2/trunk/module_56789
>
> in above example, module_1234 is identical in both project.
> When I change something in /project1/trunk/module_1234 I have to change it
> also in /project2/trunk/module_1234 (because it has to be the same)
> If there is more than two project this operation will take some time.
>
>
> What is the best way to automate such case?
>
> - create some script on client side? (each developer would use such script)
> - create some script on server side? (hooks, no script would be needed on
> developer side, but could it be done using hooks???)
> how such hook (probably post-commit) would looks like?
> svn update project2
> svn merge -c $REV http://svn/project1/trunk/module_1234
> svn commit -m "" project2
>
> ???
>
> - any other?
>
>
> Best Regards
> Jacek
>
>
>
Received on 2010-04-19 10:10:12 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.