Post subject: SVN Help (Question about path variables in Linux)
Former player
Joined: 4/16/2004
Posts: 1276
Location: Uppsala, Sweden
Allright, so I just realized that I'm a complete and utter noob at Linux. I want to check out stuff using svn from Linux on a virtual machine. When I do it locally on my win7 machine I just use the following command: svn co %SVN%/the-stuff-I-want For Linux this has proven to be more complicated for some reason and I really can't figure out what I miss. Anyway, I've googled a bit and found that you should add the svn variables to the path. Fine. So I did something like: export PATH=$PATH:/path-to-svn Now when I do: echo $PATH it's clearly there, I mean the path to the subversion stuff (yes, it's called subversion/bin ). Then I read up some more and found that you might need to add it to the bashrc file. So I used vi in order to add the same path to that file. It however still doesn't work. What am I missing here? BIG thanks in advance if anyone can shed some light on this issue.
/Walker Boh
Post subject: Re: Question about path variables in Linux
Editor, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
PATH is meant for listing those paths from which executables (i.e. programs) are to be looked for when you type a program's name without its pathname. However, your use of %SVN% suggests that what you want to do is to add repository paths to some common variable. Please explain carefully what it is you actually want to accomplish. In general, if you want to checkout some remote repository, you don't need to set up any variables. Just do this:
svn co <repository address here> <object name here>
For example:
svn checkout svn://svn.videolan.org/libdvbpsi/trunk libdvbpsi-trunk
(co is short for checkout, either word will work. I copypasted from [1].)
Post subject: Re: Question about path variables in Linux
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Walker Boh wrote:
For Linux this has proven to be more complicated for some reason and I really can't figure out what I miss.
I can't figure out what you're missing either. Doesn't your distro have an SVN package to install which handles all issues?
Walker Boh wrote:
Anyway, I've googled a bit and found that you should add the svn variables to the path. Fine. So I did something like: export PATH=$PATH:/path-to-svn
Um, that's not SVN variables, that's a path to SVN. Why isn't SVN in your default binary directory?
Walker Boh wrote:
Then I read up some more and found that you might need to add it to the bashrc file. So I used vi in order to add the same path to that file.
That only applies if you actually use BASH.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Post subject: Re: Question about path variables in Linux
Former player
Joined: 4/16/2004
Posts: 1276
Location: Uppsala, Sweden
Nach wrote:
I can't figure out what you're missing either. Doesn't your distro have an SVN package to install which handles all issues?
Well, I'm currently trying to get this to work by remote. This machine should already have svn variables installed since it can check out trunk automatically. I have now created a new directory that I want to check out trunk to. The only problem is that I can't since .svn/entries can't be found. This leads me to think that I've either located the wrong subversion directory from the beginning, or more likely that I don't fully grasp the concept of path and environment variables.
Walker Boh wrote:
Anyway, I've googled a bit and found that you should add the svn variables to the path. Fine. So I did something like: export PATH=$PATH:/path-to-svn
Nach wrote:
Um, that's not SVN variables, that's a path to SVN. Why isn't SVN in your default binary directory?
I have no idea, this is what I tried by adding: PATH=$PATH:/and-the-path-to-subversion. So instead maybe I should ask what exactly I want to find with "SVN variables"?
Walker Boh wrote:
Then I read up some more and found that you might need to add it to the bashrc file. So I used vi in order to add the same path to that file.
Nach wrote:
That only applies if you actually use BASH.
Yes, I use BASH. I hope this made it more clear. I guess my problem is that my mentor, a russian dude, is way too fast and impatient for me and that I get confused with variables and paths. Thanks again for any help, I really appreciate it.
/Walker Boh
Former player
Joined: 4/16/2004
Posts: 1276
Location: Uppsala, Sweden
Ah, sorry I missed your comment Bisqwit. What I want to do: There's some unknown problem with my current test system so I want to compare the current version of trunk with an old version. Hence I want to check out or export the old version to a new directory that I've created in the linux environment. This shouldn't be too hard, but since I can't get it to work I guess it is. So in order to check out (which is where I fail) I want to set the svn variables to the PATH and I've done this by using: PATH=$PATH:/the-path-to-subversion/bin and by adding the same path to the .bashrc file with vi. I hope this makes sense. Thank you.
/Walker Boh
Banned User, Former player
Joined: 3/10/2004
Posts: 7698
Location: Finland
The PATH environment is only related to where executable programs are searched. What happens if you write "svn" (and nothing else) in the command line? Do you get "command not found", or do you get a message from svn (probably "Type 'svn help' for usage")? If what you are getting is the latter, then PATH is not what you are looking for.
Former player
Joined: 4/16/2004
Posts: 1276
Location: Uppsala, Sweden
Yes, I'm getting "Type 'svn help' for usage". And yes, it's really frustrating when it really shouldn't be so hard. Thanks for clarifying that Warp.
/Walker Boh
Editor, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
As I wrote, you don't need to set any path variables (unless your svn executable is not in any of the directories indicated by your PATH variable, and even then, you can refer to the svn binary by its full/relative pathname). Also, you're now consistently mixing up repository paths with executable paths. If your svn executable is found without problem without any path setting (i.e. svn help shows a message from svn), you do not need to touch your PATH setting. What it is that you want to checkout? Just put that repository address on the svn commandline, after the word "co", and you're accomplishing the checkout.
Former player
Joined: 4/16/2004
Posts: 1276
Location: Uppsala, Sweden
Allright, it worked just the way you said Bisqwit. And I'm feeling like a complete moron :) First of all, BIG thanks for the help and patience! It's kinda stressing having an angry russian dude over you when you fail at simple stuff. When I got the error the first time I probably missed something really silly, like a / at the wrong place, and hence my mentor told me to fix something that wasn't really broken. Sigh. Oh well, I'm learning, slowly but steady. At least I learned how to edit the vi editor. Anyways, huge thanks for the help again all of you! I owe you one.
/Walker Boh