You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by He...@westernpower.com.au on 2006/06/29 02:26:45 UTC

Coming from CVS: how do I set up shared modules in SubVersion?

Hello,

We are in the process of converting our CVS repository to SubVersion and I 
am struggling with converting the "CVSROOT/modules" file that we have in 
CVS.

Suppose we have one project "webapp" that result in two applications: an 
admin app for the Intranet (internal) and a user app for the External 
Internet. Both apps have a lot of source code in common. The CVS 
repository file structure looks like this:
        webapp/internal/
        webapp/external/
        webapp/shared/

This is what I had defined in my CVS repository in the "CVSROOT/modules" 
file:
        _webapp_shared  -d shared       webapp/shared
        internal                webapp/internal &_webapp_shared
        external        webapp/external &_webapp_shared

This is how it works. When a developer checks out the "internal" module, 
it will also check out the shared module and stick it in the subdirectory 
"internal/shared" in my local workspace. Same for "external" module. This 
means for a developer, there are two work spaces to work on: the internal 
and external application. They would never need to check out the shared 
module by itself. Using the "svn:external" definitions, I managed to 
replicate this concept. The imported filestructure into SubVersion looks 
like this (three top level directories):
        webapp_internal/
        webapp_external/
        webapp_shared/

Then I defined the "svn:externals" property for both the "webapp_internal" 
and "webapp_external" directories to be:
        shared          file:///myRepositoryPath/webapp_shared

So basically I get the same, checking out "webapp_internal" would give me 
all sources from the internal directory as well as the shared directory.

==== SO FAR SO GOOD.  SO WHAT IS THE PROBLEM THEN? ====

The problem is that when I have got a module "webapp_internal" checked out 
and I make changes to sources in the shared directory, i have to do an 
explicit commit on the shared subdirectory. In the CVS workspace, I could 
simply issue a commit at the top level and ALL changes would be checked in 
to the repository, from both the internal module as well as the shared 
module.

Has anyone got a solution for converting the CVSROOT/modules file to 
SubVersion?

cheers,


Helmuth Stockmann
Web developer
Shared Services Provider
Western Power, 363-365 Wellington Street, Perth, WA, 6000, Australia

phone: (08) 9326 4846 | fax: (08) 9326 4938 | email: 
helmuth.stockmann@westernpower.com.au
================================================================================
WESTERN POWER. ABN 18 540 492 861, Perth, Western Australia.
Telephone: +61 8 9326 4911

TO THE ADDRESSEE: Unencrypted E-mail is not secure and may not be authentic. We cannot guarantee the accuracy, 
reliability, completeness or confidentiality of this E-mail and any attachments ("E-Mail").

IF YOU ARE NOT THE INTENDED ADDRESSEE: This E-Mail is intended solely for the intended addressee and may be subject 
to legal or other professional privilege, or may contain information that is confidential or exempt from
disclosure by law. Copying or distributing this E-Mail or any information it may contain, by anyone other than the 
intended addressee, is prohibited. If you have received this E-Mail in error please notify us immediately by return 
e-mail or by telephone; and destroy this E-Mail and any electronic or hard copies of it. Any claim to privilege or 
confidentiality is not waived or lost by reason of mistaken transmission of this E-Mail.

VIRUSES: Although we scan all outgoing e-mail and attachments for viruses, we cannot guarantee that viruses will not 
be transmitted with this E-mail. It is the recipient's responsibility to check this E-Mail for viruses.
=================================================================================

Re: Coming from CVS: how do I set up shared modules in SubVersion?

Posted by Mark Brown <ma...@cs.mu.OZ.AU>.
On 29-Jun-2006, Ryan Schmidt <su...@ryandesign.com> wrote:
> 
> On Jun 29, 2006, at 10:38, Andreas Pakulat wrote:
> 
> >On 29.06.06 10:26:45, Helmuth Stockmann wrote:
> >>So basically I get the same, checking out "webapp_internal" would  
> >>give me
> >>all sources from the internal directory as well as the shared  
> >>directory.
> >>
> >>==== SO FAR SO GOOD.  SO WHAT IS THE PROBLEM THEN? ====
> >>
> >>The problem is that when I have got a module "webapp_internal"  
> >>checked out
> >>and I make changes to sources in the shared directory, i have to  
> >>do an
> >>explicit commit on the shared subdirectory. In the CVS workspace,  
> >>I could
> >>simply issue a commit at the top level and ALL changes would be  
> >>checked in
> >>to the repository, from both the internal module as well as the  
> >>shared
> >>module.
> >
> >Without beeing a subversion geek, I'd say: Get used to it, that's the
> >way subversion works.
> 
> Being a Subversion geek, I'd say the same thing. That's how it works.

Being a SCM geek, I'd say ignore the previous two remarks.  If there are
dependencies between two components of your software, then you really
want atomic commits across both of them.  Otherwise you can end up with
an inconsistent repository.

The fact that you don't get atomic commits when using externals is a big
hint that using them this way is not what the creators of subversion
intended.  Indeed, the latest version of the book recommends that you
specify a revision in the externals property, meaning that the external
reference is intended to point to a snapshot of third party code.  It
isn't meant to be like a soft or hard link in a filesystem.

If you want the layout of your working copy to differ from the layout
in the repository, then use `svn switch'.  If you want this structure to
apply to every working copy, write a script that does the switches for you.

A special property that does this switch automatically would be a good
feature, IMHO.

Cheers,
Mark.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Coming from CVS: how do I set up shared modules in SubVersion?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 29, 2006, at 10:38, Andreas Pakulat wrote:

> On 29.06.06 10:26:45, Helmuth Stockmann wrote:
>> So basically I get the same, checking out "webapp_internal" would  
>> give me
>> all sources from the internal directory as well as the shared  
>> directory.
>>
>> ==== SO FAR SO GOOD.  SO WHAT IS THE PROBLEM THEN? ====
>>
>> The problem is that when I have got a module "webapp_internal"  
>> checked out
>> and I make changes to sources in the shared directory, i have to  
>> do an
>> explicit commit on the shared subdirectory. In the CVS workspace,  
>> I could
>> simply issue a commit at the top level and ALL changes would be  
>> checked in
>> to the repository, from both the internal module as well as the  
>> shared
>> module.
>
> Without beeing a subversion geek, I'd say: Get used to it, that's the
> way subversion works.

Being a Subversion geek, I'd say the same thing. That's how it works.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Coming from CVS: how do I set up shared modules in SubVersion?

Posted by Andreas Pakulat <ap...@gmx.de>.
On 29.06.06 10:26:45, Helmuth.Stockmann@westernpower.com.au wrote:
> So basically I get the same, checking out "webapp_internal" would give me 
> all sources from the internal directory as well as the shared directory.
> 
> ==== SO FAR SO GOOD.  SO WHAT IS THE PROBLEM THEN? ====
> 
> The problem is that when I have got a module "webapp_internal" checked out 
> and I make changes to sources in the shared directory, i have to do an 
> explicit commit on the shared subdirectory. In the CVS workspace, I could 
> simply issue a commit at the top level and ALL changes would be checked in 
> to the repository, from both the internal module as well as the shared 
> module.

Without beeing a subversion geek, I'd say: Get used to it, that's the
way subversion works.

Andreas

-- 
Cold hands, no gloves.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org