You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by charles i <ch...@yahoo.com> on 2005/10/10 10:52:35 UTC

working with multiple related projects

I'm new to SVN, and have been (unsuccessfully) trying
to set up a repository (respositories) for working
with multiple related projects.

We have many projects, all using a common base code,
and some sharing a set of sub-projects. Ideally, I
would like my repository set up like:

trunk\common\src
trunk\project1\src
trunk\project2\src

To build project1, I would first checkout "common" and
then would checkout project1 on top - any files in
common that are also in project1 will be overwritten
e.g. property files. 

Is this kind of set up possible in SVN? 

I've tried various options, but have been unable to
checkout 2 projects (i.e. common and project1) into
the same local directory. I would also like to be able
edit files in common and project1 at the same time
i.e. I don't want to have to build common as a
seperate project.

Any suggestions?

Thanks.


		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

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

Re: working with multiple related projects

Posted by charles i <ch...@yahoo.com>.
Ok - replace the word "project" with "application". 

I understand the directory structure in the repository
doesn't matter - what I don't understand is how it's
possible to work with multiple applications at the
same time e.g.

trunk\common\src
trunk\application1\src

Both directories above have a "src" directory -
application1 depends on common - how do I checkout
common and application1 in the same local directory,
without getting an error about the "src" already being
under version control?

--- "Robert P. J. Day" <rp...@mindspring.com> wrote:

> On Mon, 10 Oct 2005, charles i wrote:
> 
> > I'm new to SVN, and have been (unsuccessfully)
> trying
> > to set up a repository (respositories) for working
> > with multiple related projects.
> >
> > We have many projects, all using a common base
> code,
> > and some sharing a set of sub-projects. Ideally, I
> > would like my repository set up like:
> >
> > trunk\common\src
> > trunk\project1\src
> > trunk\project2\src
> 
> i know i've harped on this before but make sure
> you're not misled by
> the term "project."  in subversion, there is
> technically no such
> thing as a "project."  a subversion repo is simply a
> directory
> structure with subdirectories you can interpret any
> way you want.
> 
> if you want to interpret some of those directories
> as "projects,"
> that's up to you.  but subversion itself doesn't
> recognize any such
> thing.  just sayin'.
> 
> rday
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail:
> users-help@subversion.tigris.org
> 
> 



		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

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

Re: working with multiple related projects

Posted by "Robert P. J. Day" <rp...@mindspring.com>.
On Mon, 10 Oct 2005, charles i wrote:

> I'm new to SVN, and have been (unsuccessfully) trying
> to set up a repository (respositories) for working
> with multiple related projects.
>
> We have many projects, all using a common base code,
> and some sharing a set of sub-projects. Ideally, I
> would like my repository set up like:
>
> trunk\common\src
> trunk\project1\src
> trunk\project2\src

i know i've harped on this before but make sure you're not misled by
the term "project."  in subversion, there is technically no such
thing as a "project."  a subversion repo is simply a directory
structure with subdirectories you can interpret any way you want.

if you want to interpret some of those directories as "projects,"
that's up to you.  but subversion itself doesn't recognize any such
thing.  just sayin'.

rday

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

Re: working with multiple related projects

Posted by "Ph. Marek" <ph...@bmlv.gv.at>.
On Monday 10 October 2005 14:35, Robert P. J. Day wrote:
> On Mon, 10 Oct 2005, charles i wrote:
> > Yes - merging directories (in a repository) into one
> > in my working copy is what I am looking for.
> >
> > Is there any reason why Subversion doesn't support
> > this? Are there any (other) work arounds?
>
> but how would you define the semantics of such a merge?  including how
> you would commit changes back again?  are you suggesting subversion
> should keep track of which of the two directories each file in the
> "merged" working copy came from?
>
> i don't think you appreciate the difficulty of what you're asking for.
Well, I plan to write such a merge for fsvs.

I'm planning to have a stack of URLs from which to update, and each file is 
taken from the "highest" URL where it exists.

Changes in a file will be committed to the highest URL.
So it should be possible to "overlay" an URL on a machine, do some work, and 
checkin all differing files into that URL.


(Yes, that's the easy road. What is wanted above means that svn will have to 
track where a file came from - but that's just a kind of marker pointing to 
the right base-url, isn't it?)


Or am I wrong? Don't I see something which makes that impossible?


Regards,

Phil

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

Re: working with multiple related projects

Posted by Ryan Schmidt <su...@ryandesign.com>.
charles i wrote:

> Robert P. J. Day wrote:
>
>> charles i wrote:
>>
>>> Yes - merging directories (in a repository) into one in my  
>>> working copy is what I am looking for. Is there any reason why  
>>> Subversion doesn't support this? Are there any (other) work arounds?
>>>
>>
>> but how would you define the semantics of such a merge? including  
>> how you would commit changes back again? are you suggesting  
>> subversion should keep track of which of the two directories each  
>> file in the "merged" working copy came from?
>>
>
> That would be the ideal, but I realise not easy to implement,  
> especially if there is lots of overlap under the two directories.
>
> However, in most cases, I would suggest that there is no or very  
> little overlap - it is quite easy (if you've got sensible package  
> names under the two directories) to manually determine where the  
> files have been checked out from and where new files should be added.
>

Are you saying you do not have much overlap between the project- 
specific code and the common code it's supposed to overlay? If so,  
why not just include the common code into the project with  
svn:externals?



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

Re: working with multiple related projects

Posted by charles i <ch...@yahoo.com>.
That would be the ideal, but I realise not easy to
implement, especially if there is lots of overlap
under the two directories. 

However, in most cases, I would suggest that there is
no or very little overlap - it is quite easy (if
you've got sensible package names under the two
directories) to manually determine where the files
have been checked out from and where new files should
be added. It would be nice if you could switch*
between different URL's in the repository and then
manually select the changes from your working copy you
wish to commit (to the current URL). 

* not to be confused with the svn:switch command


--- "Robert P. J. Day" <rp...@mindspring.com> wrote:

> On Mon, 10 Oct 2005, charles i wrote:
> 
> > Yes - merging directories (in a repository) into
> one
> > in my working copy is what I am looking for.
> >
> > Is there any reason why Subversion doesn't support
> > this? Are there any (other) work arounds?
> 
> but how would you define the semantics of such a
> merge?  including how
> you would commit changes back again?  are you
> suggesting subversion
> should keep track of which of the two directories
> each file in the
> "merged" working copy came from?
> 
> i don't think you appreciate the difficulty of what
> you're asking for.
> 
> rday
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail:
> users-help@subversion.tigris.org
> 
> 



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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

Re: working with multiple related projects

Posted by "Robert P. J. Day" <rp...@mindspring.com>.
On Mon, 10 Oct 2005, charles i wrote:

> Yes - merging directories (in a repository) into one
> in my working copy is what I am looking for.
>
> Is there any reason why Subversion doesn't support
> this? Are there any (other) work arounds?

but how would you define the semantics of such a merge?  including how
you would commit changes back again?  are you suggesting subversion
should keep track of which of the two directories each file in the
"merged" working copy came from?

i don't think you appreciate the difficulty of what you're asking for.

rday

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

Re: working with multiple related projects

Posted by charles i <ch...@yahoo.com>.
Yes - merging directories (in a repository) into one
in my working copy is what I am looking for.

Is there any reason why Subversion doesn't support
this? Are there any (other) work arounds?

--- "Ph. Marek" <ph...@bmlv.gv.at> wrote:

> On Monday 10 October 2005 12:52, charles i wrote:
> > I'm new to SVN, and have been (unsuccessfully)
> trying
> > to set up a repository (respositories) for working
> > with multiple related projects.
> >
> > We have many projects, all using a common base
> code,
> > and some sharing a set of sub-projects. Ideally, I
> > would like my repository set up like:
> >
> > trunk\common\src
> > trunk\project1\src
> > trunk\project2\src
> >
> > To build project1, I would first checkout "common"
> and
> > then would checkout project1 on top - any files in
> > common that are also in project1 will be
> overwritten
> > e.g. property files.
> >
> > Is this kind of set up possible in SVN?
> >
> > I've tried various options, but have been unable
> to
> > checkout 2 projects (i.e. common and project1)
> into
> > the same local directory. I would also like to be
> able
> > edit files in common and project1 at the same time
> > i.e. I don't want to have to build common as a
> > seperate project.
> >
> > Any suggestions?
> If I understand you correctly, you'd like to "merge"
> two directories in the 
> repository into one in your working copy.
> This is not possible with subversion.
> 
> I'll be trying to get such a thing done in fsvs
> (fsvs.tigris.org), but that 
> won't work for source control - it's thought for
> machine installations.
> 
> What you possibly need is
> - checkout your common folder beneath or below your
> project1 directory
>   (possibly using svn:externals)
> - modify your Makefile to search the other directory
> too (either 
>   hardcoded, or with something like
>  
>
http://www.gnu.org/software/make/manual/html_chapter/make_4.html#SEC34)
> 
> Hope that helps.
> 
> 
> Regards,
> 
> Phil
> 



		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

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

Re: working with multiple related projects

Posted by "Ph. Marek" <ph...@bmlv.gv.at>.
On Monday 10 October 2005 12:52, charles i wrote:
> I'm new to SVN, and have been (unsuccessfully) trying
> to set up a repository (respositories) for working
> with multiple related projects.
>
> We have many projects, all using a common base code,
> and some sharing a set of sub-projects. Ideally, I
> would like my repository set up like:
>
> trunk\common\src
> trunk\project1\src
> trunk\project2\src
>
> To build project1, I would first checkout "common" and
> then would checkout project1 on top - any files in
> common that are also in project1 will be overwritten
> e.g. property files.
>
> Is this kind of set up possible in SVN?
>
> I've tried various options, but have been unable to
> checkout 2 projects (i.e. common and project1) into
> the same local directory. I would also like to be able
> edit files in common and project1 at the same time
> i.e. I don't want to have to build common as a
> seperate project.
>
> Any suggestions?
If I understand you correctly, you'd like to "merge" two directories in the 
repository into one in your working copy.
This is not possible with subversion.

I'll be trying to get such a thing done in fsvs (fsvs.tigris.org), but that 
won't work for source control - it's thought for machine installations.

What you possibly need is
- checkout your common folder beneath or below your project1 directory
  (possibly using svn:externals)
- modify your Makefile to search the other directory too (either 
  hardcoded, or with something like
  http://www.gnu.org/software/make/manual/html_chapter/make_4.html#SEC34)

Hope that helps.


Regards,

Phil

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