You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jacob Norda <Ja...@Trimble.com> on 2004/11/24 22:02:35 UTC

Sharing modules across projects - will this work?

Contemplating switching to Subversion, but want to confirm that I can
really do what I'm about to outline: 
 
We have a shared "core" module which is used by many projects. The core
is essentially the same across, but development of it happens within a
given project. This means that changes need to be somewhat controlled
and that frequent merges needs to happen across projects or we run into
a lot of problems with features/bugs not fixed in all projects. 
 
Historically we've used CVS and had a branch for each project in the
core module. This lead to a lot of headaches, mostly relating to
insufficient merging, difficulty branching (they need to go across the
entire project which consists of multiple modules), need to use
batch-files to control the checkout for a given project etc etc (we've
tried aliases, but it gets messy when we start tagging & branching). 
 
With Subversion I'm under the impression that I can have the following
setup: 
 
The "main" core module would have it's own directory: 
 
\core\trunk\...
 
The project would branch the core _into_ it's own directory: 
 
myproject\trunk\core\...
 
(the myproject\trunk\ also contains all the project-specific code)
 
Then when the project-based core-changes need to be merged back, we'd
merge _from_ the project _to_ the core: 
 
merge myproject\trunk\core\... => core\trunk\...
 
The branch would then be deleted: 
 
del myproject\trunk\core\...
 
The main core would then be tagged: 
 
tag core\trunk\... => core\tags\CORE_X_Y_MYPROJECT
 
and subsequently branched out to the project: 
 
branch core\tags\CORE_X_Y_MYPROJECT\... => myproject\trunk\core\...
 
 
This way, the project contains it's own copy of the core and it can be
branched and tagged just as normal, but we also have a controlled way of
sharing the module through backmerging. 
 
Will this work? Is it the "right" way of doing it, or should we be doing
it another way? 
 
Thanks
Jacob
 
ps. please respond both to the list and to my private email. Thanks!

Re: Sharing modules across projects - will this work?

Posted by Shurik O <sh...@gmail.com>.
Jacob,

Why do you think you need the delete-tag-copy? It seems repeated merges from the
module's trunk would do the job.

We are thinking about a similar procedure except for the delete part. Contributed script,
"svnmerge" may be of help here. It records the last merged revision as a property used
subsequently to do "incremental" merge.

Jacob Norda wrote on 11/24/2004 2:02 PM:
> Contemplating switching to Subversion, but want to confirm that I can 
> really do what I'm about to outline:
>  
> We have a shared "core" module which is used by many projects. The core 
> is essentially the same across, but development of it happens within a 
> given project. This means that changes need to be somewhat controlled 
> and that frequent merges needs to happen across projects or we run into 
> a lot of problems with features/bugs not fixed in all projects.
>  
> Historically we've used CVS and had a branch for each project in the 
> core module. This lead to a lot of headaches, mostly relating to 
> insufficient merging, difficulty branching (they need to go across the 
> entire project which consists of multiple modules), need to use 
> batch-files to control the checkout for a given project etc etc (we've 
> tried aliases, but it gets messy when we start tagging & branching).
>  
> With Subversion I'm under the impression that I can have the following 
> setup:
>  
> The "main" core module would have it's own directory:
>  
> \core\trunk\...
>  
> The project would branch the core _into_ it's own directory:
>  
> myproject\trunk\core\...
>  
> (the myproject\trunk\ also contains all the project-specific code)
>  
> Then when the project-based core-changes need to be merged back, we'd 
> merge _from_ the project _to_ the core:
>  
> merge myproject\trunk\core\... => core\trunk\...
>  
> The branch would then be deleted:
>  
> del myproject\trunk\core\...
>  
> The main core would then be tagged:
>  
> tag core\trunk\... => core\tags\CORE_X_Y_MYPROJECT
>  
> and subsequently branched out to the project:
>  
> branch core\tags\CORE_X_Y_MYPROJECT\... => myproject\trunk\core\...
>  
>  
> This way, the project contains it's own copy of the core and it can be 
> branched and tagged just as normal, but we also have a controlled way of 
> sharing the module through backmerging.
>  
> Will this work? Is it the "right" way of doing it, or should we be doing 
> it another way?
>  
> Thanks
> Jacob
>  
> ps. please respond both to the list and to my private email. Thanks!
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org


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