You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by pipehappy <pi...@gmail.com> on 2006/05/06 08:34:26 UTC

how to use environment variable

Hello anyone here:

When using svn command, it seems have to explicit path to the repos. I
remember when using CVS, an environment variable can contain the
default path and user can do not care about the path to repos.

Does Subversion have the similar facility that I can use some default
URL to the repos?

Thanks

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


Re: how to use environment variable

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 6, 2006, at 10:34, pipehappy wrote:

> When using svn command, it seems have to explicit path to the repos. I
> remember when using CVS, an environment variable can contain the
> default path and user can do not care about the path to repos.

When using svn commands that operate on a working copy, Subversion  
obtains the repository URL from the working copy. You can see which  
URL it's using by typing "svn info" while you're in the working copy  
in question.


> Does Subversion have the similar facility that I can use some default
> URL to the repos?

For svn commands that do not operate on working copies, you must  
specify the URL to the repository. Subversion has no facitily for  
making this any easier, because it does not need to, because your  
shell has the ability to define environment variables which you can  
use for this purpose. For example, I have something like this in  
my .bash_profile:

export REPO=https://svn.example.com

Then I can say things like:

svn checkout $REPO/project/trunk project-trunk

This is for the Bash shell; converting this for use with a different  
shell, or Windows, is left as an exercise for the reader.




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