You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steve Kargl <sg...@troutmask.apl.washington.edu> on 2006/03/03 20:29:30 UTC

Environmental variable for path to repository?

First, I've searched the Subversion Book and the on-line FAQ,
but have not been able to find an answer to my problem.

I am considering the conversion of several of my projects
under CVS control to SVN.  With CVS, I set the CVSROOT
environmental variable to /long/path/to/my/directory/CVS.
Under CVSROOT, I have project A, B, C, and D.  To work
on project B, I often move into the $HOME/prj directory
and issue the CVS command "cvs checkout B".  This command
will automatically look in CVSROOT for project B.  Is
there an equivalent to CVSROOT in subversion?

I would like to do 

mkdir $HOME/path/to/SVN
setenv SVNROOT $HOME/path/to/SVN
svnadmin create A

where A shows up in $HOME/path/to/SVN.

-- 
Steve

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

Re: Environmental variable for path to repository?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 3, 2006, at 23:15, Steve Kargl wrote:

>> Subversion doesn't have any such support built-in, but you can do it
>> yourself on the shell.
>>
>> export S=$HOME/path/to/SVN
>> mkdir $S
>> svnadmin create $S/A
>> cd $HOME/prj
>> svn checkout $S/A
>
> Having to explicitly give an environmental variable on the
> command line for each svn command, kind of defeats the whole
> purpose of such variables.

It's not for every svn command, of course. Just a few. Creating a  
repository, checking out a working copy, merging. Most of them,  
though, like checking in, updating, getting a diff or a log, all  
operate on the repository URL stored in your working copy.



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

Re: Environmental variable for path to repository?

Posted by Frank Gruman <fg...@verizon.net>.
Steve Kargl wrote:
> On Fri, Mar 03, 2006 at 05:30:05PM -0500, Frank Gruman wrote:
>   
>> <snip>
>> For example - I have 3 separate working copies attached to 3 separate 
>> repositories.  The first is our code server, the second is a completely 
>> separate repository for documents, and the third is my own personal code 
>> server that I have hosted from home.  SO - in the CVS world, what would 
>> I set my CVSROOT to?  Given Ryan's response, I could create 
>> $CODE/project/path, $DOCS/project/path, and $HOME/project/path.
>>
>>     
>
> It is clear that you and I have a different idea on what a repository
> is.  To me, a repository contains independent projects.  To you, each
> independent project has its own repository.
>
>   
Not necessarily.  I have all of my code projects in one repository.  We 
have 4 separate applications in that code repository.  Same thing with 
documentation.  There is documentation for the code projects as well as 
other things such as sales RFPs, departmental standards and procedures, 
etc.  And then, or course, my own personal code for my own personal 
projects should have absolutely zero interaction with the other 
repositories I have to maintain for work.

So perhaps the first two can be broken down by purpose since I have the 
flexibility to do that, but the third is separate out of necessity.  And 
I could still use my original method without running the risk of mixing 
things up.

Regards,
Frank

Re: Environmental variable for path to repository?

Posted by Steve Kargl <sg...@troutmask.apl.washington.edu>.
On Sat, Mar 04, 2006 at 02:06:42PM -0500, Frank Gruman wrote:
> Steve Kargl wrote:
> >>>      
> >
> >So, you're suggesting that I don't collaborate with others?
> >
> >I have CVSROOT set to $HOME/CVS and I had three different
> >versions of GCC on my system via cvs.   GCC moved to svn,
> >which has prompted my potential move of $HOME/CVS to svn.
> >
> >  
> So all of your projects are GCC.  They pretty much all come from one 
> server.  Try working on more than one project that is hosted by separate 
> servers.  Even if they are all running CVS, the CVSROOT would not work 
> properly unless you reset it for each program you are trying to run. 

It works fine.  $HOME/CVS contains my personal proctes.
The GCC trees are checkout with the -d option, which
sets the root for the GCC tress.

I got the answer I was looking for.  svn does not have
an equivalent to CVSROOT.

-- 
Steve

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

Re: Environmental variable for path to repository?

Posted by Frank Gruman <fg...@verizon.net>.
Steve Kargl wrote:
> On Fri, Mar 03, 2006 at 07:28:34PM -0500, Duncan Murdoch wrote:
>   
>> Steve Kargl wrote:
>>     
>>> On Fri, Mar 03, 2006 at 05:30:05PM -0500, Frank Gruman wrote:
>>>       
>>>> Steve Kargl wrote:
>>>>         
>>>>> On Fri, Mar 03, 2006 at 10:53:15PM +0100, Ryan Schmidt wrote:
>>>>>           
>>>>>> export S=$HOME/path/to/SVN
>>>>>> mkdir $S
>>>>>> svnadmin create $S/A
>>>>>> cd $HOME/prj
>>>>>> svn checkout $S/A
>>>>>>             
>>>>> Having to explicitly give an environmental variable on the
>>>>> command line for each svn command, kind of defeats the whole
>>>>> purpose of such variables.
>>>>>
>>>>>           
>>>> I disagree.  You could theoretically have different variables pointing 
>>>> to different repositories with various working copies on your computer. 
>>>>
>>>> For example - I have 3 separate working copies attached to 3 separate 
>>>> repositories.  The first is our code server, the second is a completely 
>>>> separate repository for documents, and the third is my own personal code 
>>>> server that I have hosted from home.  SO - in the CVS world, what would 
>>>> I set my CVSROOT to?  Given Ryan's response, I could create 
>>>> $CODE/project/path, $DOCS/project/path, and $HOME/project/path.
>>>>
>>>>         
>>> It is clear that you and I have a different idea on what a repository
>>> is.  To me, a repository contains independent projects.  To you, each
>>> independent project has its own repository.
>>>       
>> Or perhaps he collaborates on several projects hosted by other people.
>>
>>     
>
> So, you're suggesting that I don't collaborate with others?
>
> I have CVSROOT set to $HOME/CVS and I had three different
> versions of GCC on my system via cvs.   GCC moved to svn,
> which has prompted my potential move of $HOME/CVS to svn.
>
>   
So all of your projects are GCC.  They pretty much all come from one 
server.  Try working on more than one project that is hosted by separate 
servers.  Even if they are all running CVS, the CVSROOT would not work 
properly unless you reset it for each program you are trying to run. 

I have a friend who swears by CVS, and his way of telling me what he 
does is that he has a shell script that he wrote to automatically switch 
his CVSROOT from one location to the next so he could maintain the 6 or 
so different projects he works on.  To me, that is just another work 
around / hack to setting 6 separate environment variables and calling 
them in the few instances in which you actually need them in Subversion.

Regards,
Frank

Re: Environmental variable for path to repository?

Posted by Steve Kargl <sg...@troutmask.apl.washington.edu>.
On Fri, Mar 03, 2006 at 07:28:34PM -0500, Duncan Murdoch wrote:
> Steve Kargl wrote:
> >On Fri, Mar 03, 2006 at 05:30:05PM -0500, Frank Gruman wrote:
> >>Steve Kargl wrote:
> >>>On Fri, Mar 03, 2006 at 10:53:15PM +0100, Ryan Schmidt wrote:
> >>>>export S=$HOME/path/to/SVN
> >>>>mkdir $S
> >>>>svnadmin create $S/A
> >>>>cd $HOME/prj
> >>>>svn checkout $S/A
> >>>
> >>>Having to explicitly give an environmental variable on the
> >>>command line for each svn command, kind of defeats the whole
> >>>purpose of such variables.
> >>>
> >>
> >>I disagree.  You could theoretically have different variables pointing 
> >>to different repositories with various working copies on your computer. 
> >>
> >>For example - I have 3 separate working copies attached to 3 separate 
> >>repositories.  The first is our code server, the second is a completely 
> >>separate repository for documents, and the third is my own personal code 
> >>server that I have hosted from home.  SO - in the CVS world, what would 
> >>I set my CVSROOT to?  Given Ryan's response, I could create 
> >>$CODE/project/path, $DOCS/project/path, and $HOME/project/path.
> >>
> >
> >It is clear that you and I have a different idea on what a repository
> >is.  To me, a repository contains independent projects.  To you, each
> >independent project has its own repository.
> 
> Or perhaps he collaborates on several projects hosted by other people.
> 

So, you're suggesting that I don't collaborate with others?

I have CVSROOT set to $HOME/CVS and I had three different
versions of GCC on my system via cvs.   GCC moved to svn,
which has prompted my potential move of $HOME/CVS to svn.

-- 
Steve

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

Re: Environmental variable for path to repository?

Posted by Duncan Murdoch <mu...@stats.uwo.ca>.
Steve Kargl wrote:
> On Fri, Mar 03, 2006 at 05:30:05PM -0500, Frank Gruman wrote:
> 
>>Steve Kargl wrote:
>>
>>>On Fri, Mar 03, 2006 at 10:53:15PM +0100, Ryan Schmidt wrote:
>>> 
>>>
>>>>export S=$HOME/path/to/SVN
>>>>mkdir $S
>>>>svnadmin create $S/A
>>>>cd $HOME/prj
>>>>svn checkout $S/A
>>>>   
>>>
>>>Having to explicitly give an environmental variable on the
>>>command line for each svn command, kind of defeats the whole
>>>purpose of such variables.
>>>
>>> 
>>
>>I disagree.  You could theoretically have different variables pointing 
>>to different repositories with various working copies on your computer. 
>>
>>For example - I have 3 separate working copies attached to 3 separate 
>>repositories.  The first is our code server, the second is a completely 
>>separate repository for documents, and the third is my own personal code 
>>server that I have hosted from home.  SO - in the CVS world, what would 
>>I set my CVSROOT to?  Given Ryan's response, I could create 
>>$CODE/project/path, $DOCS/project/path, and $HOME/project/path.
>>
> 
> 
> It is clear that you and I have a different idea on what a repository
> is.  To me, a repository contains independent projects.  To you, each
> independent project has its own repository.

Or perhaps he collaborates on several projects hosted by other people.

Duncan Murdoch

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

Re: Environmental variable for path to repository?

Posted by Steve Kargl <sg...@troutmask.apl.washington.edu>.
On Fri, Mar 03, 2006 at 05:30:05PM -0500, Frank Gruman wrote:
> Steve Kargl wrote:
> >On Fri, Mar 03, 2006 at 10:53:15PM +0100, Ryan Schmidt wrote:
> >  
> >>export S=$HOME/path/to/SVN
> >>mkdir $S
> >>svnadmin create $S/A
> >>cd $HOME/prj
> >>svn checkout $S/A
> >>    
> >
> >Having to explicitly give an environmental variable on the
> >command line for each svn command, kind of defeats the whole
> >purpose of such variables.
> >
> >  
> I disagree.  You could theoretically have different variables pointing 
> to different repositories with various working copies on your computer. 
> 
> For example - I have 3 separate working copies attached to 3 separate 
> repositories.  The first is our code server, the second is a completely 
> separate repository for documents, and the third is my own personal code 
> server that I have hosted from home.  SO - in the CVS world, what would 
> I set my CVSROOT to?  Given Ryan's response, I could create 
> $CODE/project/path, $DOCS/project/path, and $HOME/project/path.
> 

It is clear that you and I have a different idea on what a repository
is.  To me, a repository contains independent projects.  To you, each
independent project has its own repository.

-- 
Steve

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

Re: Environmental variable for path to repository?

Posted by Frank Gruman <fg...@verizon.net>.
Steve Kargl wrote:
> On Fri, Mar 03, 2006 at 10:53:15PM +0100, Ryan Schmidt wrote:
>   
>> On Mar 3, 2006, at 21:29, Steve Kargl wrote:
>>
>>     
>>> I am considering the conversion of several of my projects
>>> under CVS control to SVN.  With CVS, I set the CVSROOT
>>> environmental variable to /long/path/to/my/directory/CVS.
>>> Under CVSROOT, I have project A, B, C, and D.  To work
>>> on project B, I often move into the $HOME/prj directory
>>> and issue the CVS command "cvs checkout B".  This command
>>> will automatically look in CVSROOT for project B.  Is
>>> there an equivalent to CVSROOT in subversion?
>>>
>>> I would like to do
>>>
>>> mkdir $HOME/path/to/SVN
>>> setenv SVNROOT $HOME/path/to/SVN
>>> svnadmin create A
>>>
>>> where A shows up in $HOME/path/to/SVN.
>>>       
>> Subversion doesn't have any such support built-in, but you can do it  
>> yourself on the shell.
>>
>> export S=$HOME/path/to/SVN
>> mkdir $S
>> svnadmin create $S/A
>> cd $HOME/prj
>> svn checkout $S/A
>>     
>
> Having to explicitly give an environmental variable on the
> command line for each svn command, kind of defeats the whole
> purpose of such variables.
>
>   
I disagree.  You could theoretically have different variables pointing 
to different repositories with various working copies on your computer. 

For example - I have 3 separate working copies attached to 3 separate 
repositories.  The first is our code server, the second is a completely 
separate repository for documents, and the third is my own personal code 
server that I have hosted from home.  SO - in the CVS world, what would 
I set my CVSROOT to?  Given Ryan's response, I could create 
$CODE/project/path, $DOCS/project/path, and $HOME/project/path.

Regards,
Frank

Re: Environmental variable for path to repository?

Posted by Steve Kargl <sg...@troutmask.apl.washington.edu>.
On Fri, Mar 03, 2006 at 10:53:15PM +0100, Ryan Schmidt wrote:
> On Mar 3, 2006, at 21:29, Steve Kargl wrote:
> 
> >I am considering the conversion of several of my projects
> >under CVS control to SVN.  With CVS, I set the CVSROOT
> >environmental variable to /long/path/to/my/directory/CVS.
> >Under CVSROOT, I have project A, B, C, and D.  To work
> >on project B, I often move into the $HOME/prj directory
> >and issue the CVS command "cvs checkout B".  This command
> >will automatically look in CVSROOT for project B.  Is
> >there an equivalent to CVSROOT in subversion?
> >
> >I would like to do
> >
> >mkdir $HOME/path/to/SVN
> >setenv SVNROOT $HOME/path/to/SVN
> >svnadmin create A
> >
> >where A shows up in $HOME/path/to/SVN.
> 
> Subversion doesn't have any such support built-in, but you can do it  
> yourself on the shell.
> 
> export S=$HOME/path/to/SVN
> mkdir $S
> svnadmin create $S/A
> cd $HOME/prj
> svn checkout $S/A

Having to explicitly give an environmental variable on the
command line for each svn command, kind of defeats the whole
purpose of such variables.

-- 
Steve

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

Re: Environmental variable for path to repository?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 3, 2006, at 21:29, Steve Kargl wrote:

> I am considering the conversion of several of my projects
> under CVS control to SVN.  With CVS, I set the CVSROOT
> environmental variable to /long/path/to/my/directory/CVS.
> Under CVSROOT, I have project A, B, C, and D.  To work
> on project B, I often move into the $HOME/prj directory
> and issue the CVS command "cvs checkout B".  This command
> will automatically look in CVSROOT for project B.  Is
> there an equivalent to CVSROOT in subversion?
>
> I would like to do
>
> mkdir $HOME/path/to/SVN
> setenv SVNROOT $HOME/path/to/SVN
> svnadmin create A
>
> where A shows up in $HOME/path/to/SVN.

Subversion doesn't have any such support built-in, but you can do it  
yourself on the shell.

export S=$HOME/path/to/SVN
mkdir $S
svnadmin create $S/A
cd $HOME/prj
svn checkout $S/A



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