You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Chris Rogers <ch...@norcross.com.au> on 2004/07/22 23:22:45 UTC

Help moving from a CVS paradigm!

Hi all,

I am a user of CVS, investigating the option of moving to Subversion.

I have a (newbie) question, which reveals my lack of understanding of how 
subversion is supposed to work.  I hope someone can shine some light on it 
for me.

We have a lot of common source files, which are general files used in 
dozens of different projects (let's say - mybutton.h, mystring.h etc).
Under CVS, I was able to setup a "common" project which included these 
files and had other projects link these in.  Then when one is updated, all 
the other projects will see these changes.
 From what I can understand, this is not how things work in the world of 
subversion (where there are no real "links" between projects). Manually 
merging a changed file across all projects that use it (and remembering 
which ones use it in the first place) will bring me into grief.

This is such a common type of setup that I know most people will have had 
to think about this and come up with workable solutions.
How do you do achieve what I describe above, being able to easily update 
commonly shared code?

Cheers,
Chris


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

Re: Help moving from a CVS paradigm!

Posted by Ben Collins-Sussman <su...@collab.net>.
On Mon, 2004-07-26 at 00:23, Chris Rogers wrote:

> I possibly asked the wrong question.
> What would be the recommended way of reusing an old file in a new project - 
> let's say "mystring.h"?

svn:externals currently only operates on directories, not individual
files.  So you can share a directory full of headers, for example, but
not a single header file.




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

Re: Help moving from a CVS paradigm!

Posted by Chris Rogers <ch...@norcross.com.au>.
Hi Ben,

Thanks for the info!  This is indeed very close to what I was asking for.
They effectively allow one to link a project with another.  Do you mind if 
I push a little deeper in relation to that topic?

Do you know if there is a way to link only *some* files within the external 
project?
ie using my previous example, if I had a "common" directory containing a 
heap of
common files (say mybutton.h, mystring.h etc etc), I could link that entire 
"common" directory in, but not a small subset - which would be cumbersome 
if I only required one or two files from that common project.

The need for developers to reuse common code or classes in many different 
projects would be reasonably widespread I would imagine, so I assume that 
this concept has been tackled before.  There must be a conventional way of 
handling such a situation.

I possibly asked the wrong question.
What would be the recommended way of reusing an old file in a new project - 
let's say "mystring.h"?
Do subversion users generally make a separate copy it and allow it to live 
as a different file to all the other copies of that file?   What is the 
best way of making sure that any bugfixes to that file make their way out 
to all other projects with their own copy of that file?

Thanks,
Chris Rogers

At 10:06 AM 23/07/2004, Ben Reser wrote:

>I think you'll want to look into svn:externals.
>You can read about them here in the book:
>http://svnbook.red-bean.com/svnbook/ch07s03.html



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

Re: Help moving from a CVS paradigm!

Posted by Ben Reser <br...@gmail.com>.
On Fri, 23 Jul 2004 09:22:45 +1000, Chris Rogers
<ch...@norcross.com.au> wrote:
> I am a user of CVS, investigating the option of moving to Subversion.
> 
> I have a (newbie) question, which reveals my lack of understanding of how
> subversion is supposed to work.  I hope someone can shine some light on it
> for me.
> 
> We have a lot of common source files, which are general files used in
> dozens of different projects (let's say - mybutton.h, mystring.h etc).
> Under CVS, I was able to setup a "common" project which included these
> files and had other projects link these in.  Then when one is updated, all
> the other projects will see these changes.
>  From what I can understand, this is not how things work in the world of
> subversion (where there are no real "links" between projects). Manually
> merging a changed file across all projects that use it (and remembering
> which ones use it in the first place) will bring me into grief.
> 
> This is such a common type of setup that I know most people will have had
> to think about this and come up with workable solutions.
> How do you do achieve what I describe above, being able to easily update
> commonly shared code?

I think you'll want to look into svn:externals.
You can read about them here in the book:
http://svnbook.red-bean.com/svnbook/ch07s03.html

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

Re: Help moving from a CVS paradigm!

Posted by m christensen <df...@xmission.com>.
Look at the 'external' functionality.

Stick all the common files in a specific directory or directory tree in 
a dedicated repository,
and '~include~' that directory in all your other repositories

Chris Rogers wrote:

> I am a user of CVS, investigating the option of moving to Subversion.
>
> I have a (newbie) question, which reveals my lack of understanding of 
> how subversion is supposed to work.  I hope someone can shine some 
> light on it for me.
>
> We have a lot of common source files, which are general files used in 
> dozens of different projects (let's say - mybutton.h, mystring.h etc).
> Under CVS, I was able to setup a "common" project which included these 
> files and had other projects link these in.  Then when one is updated, 
> all the other projects will see these changes.
> From what I can understand, this is not how things work in the world 
> of subversion (where there are no real "links" between projects). 
> Manually merging a changed file across all projects that use it (and 
> remembering which ones use it in the first place) will bring me into 
> grief.
>
> This is such a common type of setup that I know most people will have 
> had to think about this and come up with workable solutions.
> How do you do achieve what I describe above, being able to easily 
> update commonly shared code?
>
> Cheers,
> Chris
>
>
> ---------------------------------------------------------------------
> 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