views:

5194

answers:

3

Hello I want to use commandline svn options.

I use TortoiseSVN and I run several commands and I get the following error:

'svn' is not recognized as an internal or external command

I used the command

svn checkout [-N] [--ignore-externals] [-r rev] URL PATH

I think I should add some environment variable or something else.

Any idea what I should do or can't TortoiseSVN be used from the command line?

+13  A: 

TortoiseSVN has a command-line interface, but it's different from the normal Subversion one.

You can find information about the command-line options of TortoiseSVN in the documentation: Appendix D. Automating TortoiseSVN. The main program to work with here is TortoiseProc.exe. But a note pretty much at the top theer already says:

Remember that TortoiseSVN is a GUI client, and this automation guide shows you how to make the TortoiseSVN dialogs appear to collect user input. If you want to write a script which requires no input, you should use the official Subversion command line client instead.

Another option would be that you install the Subversion binaries. Slik SVN is a nice build (and doesn't require a registration like Collabnet).

Joey
Just to add to this - make sure Tortoise is on your path. Otherwise, nothing will work.
Thomas Owens
Based on this answer, I think the best bet would be to install the actual SVN command-line client rather than learn a second command-line interface. I don't know how to do that, though.
jprete
Thomas: By default both TortoiseSVN and Slik SVN will alter the path accordingly.
Joey
Where i check that ok button in the settings ?I couldn't find that option there .thanks
Night Walker
CollabNet Subversion will be a good choice ?
Night Walker
Now you got me puzzled. What OK button?
Joey
Night Walker: If you like to register for something as mundane as a build of publicly available sources, then sure, go ahead. I included a link to an alternative, though.
Joey
+1  A: 

I'd suggest slik subversion. And after installing just add its bin directory to your path.

-bhups

bhups
It adds itself to the PATH on installation anyway.
Joey
A: 

I usually have the standard SVN installed as well as TSvn - just add the binary location of SVN to your PATH environment variable.

Using the standard SVN command line tool will be better for getting help and documentation than using any other svn pseudo client.

Tim
TortoiseSVN is probably the most used Windows GUI SVN client there is and it's thoroughly documented. I wouldn't call it pseudo-client just because it's not the reference command-line implementation.
Joey
I meant the command line TSVN - not the GUI one. A different poster suggested to use the TSVN command line - which, I gather, is not the same as using SVN. My point is that if you are going to use tsvn, use it as intended - as a GUI client. If you are going to use command line, use the original...
Tim
That's exactly what the docs say, too :-)
Joey