Subversion/client
Contents
Intro[edit | edit source]
What is a subversion client? The simple definition is that a Subversion client is the tool you use to manage your files. More specifically, it is a software program that lets you interact with a (Subversion) version-controlled file repository. There are many clients available for working with your subversion version control system. See http://subversion.tigris.org/links.html#clients This article provides some introduction to the popular clients for working with a Subversion backend.
It is common to provide a versioned file system employing WebDAV in addition to subversion. Systems employing WebDAV really assist the user because the tool might be your familiar OpenOffice suite. In such a scenario the notion of Working with Version Control is almost invisible to the user (and in fact most of the features are not available when using a Webdav Client). As important and as useful as a versioned filesystem may be, it is rarely the primary goal of the end user to 'version my files'.
Command-line Client[edit | edit source]
(see "Quick Setup" section) Many developers and system administrators like to use the command-line client. Technical documentation often refers to the command-line svn client. Developers and system administrators should be familiar with the command-line svn client. The command-line client is distributed with Subversion itself, so you would install Subversion to get the command-line client.
Available Languages[edit | edit source]
Each subversion client (such as tortoisesvn or kdesvn) is a separate project and so the availability of translated interfaces, and translated support information is dependent on that particular project. The command-line svn client is available in many languages as it the subversion book.
locate subversion.mo
will tell you what translations for the svn client are installed on a linux host.
As you can see at http://tortoisesvn.net/translation_release_gui , TortoiseSVN is available in roughly 28 different languages, making it a good choice for non-English contributors. The documentation is similarly translated into many languages.
Preferred Clients[edit | edit source]
Linux[edit | edit source]
The first choice is the KDESvn client that speaks directly to SVN, not a frontend to the command-line tool. It uses the QT library so it looks good on all systems where KDE looks good. If you use it, please read the documentation for KDESvn
RapidSVN is another choice for Linux, using the wxWidgets interface. It provides settings for external browse, diff and merge tools (like KDESvn) but is not integrated into the desktop the way that KDESvn is integrated into the KDE desktop environment.
Windows[edit | edit source]
TortoiseSVN is probably the most widely used subversion client program for Windows (because of the successful predecessor TortoiseCVS -- which actually is a different software project). It works by integrating into Windows Explorer, so that once it is installed you use Windows Explorer to browse and manipulate your "local working copy". TortoiseSVN is a good program. As is the case with all good software, you should READ THE FINE MANUAL and understand how the program works to get the full benefit of the software without frustration or delays. The documentation is written by other users who can help you understand the concepts of Revision Control, and educate you about standard policies and procedures; it also makes you familiar with the menus and commands as they are implemented in TortoiseSVN. There is a very large and active community around TortoiseSVN which should be able to assist you with questions.
Get started by reading the tortoisesvn documentation
You should read the FAQ and also the 'Daily Use' section, especially if you are new to either subversion or revision control systems. There is also an extensive 'How to install and use TortoiseSVN' article on BEA's website.
If you just want to ignore all advice and learning opportunities, then read the Quick Setup section below.
Macintosh[edit | edit source]
Versions is perhaps the best client for the Macintosh, but it is not free.
A GUI option that is opensource and free is svnX from 'La Chose Interactive'
Some of the cross-platform solutions like WorkBench or subclipse might be good on Mac -- especially if you want to work on multiple platforms.
You may need to use a compatibility layer to provide these tools on your operating system. Apple Mac OS X users have access to Fink. The Fink Project, hosted on SourceForge.net, provides hundreds of prepackaged Open Source tools for Mac OS X users. Fink may be installed using the instructions in the Fink Quick Start guide. I don't know whether the KDE desktop, or KDESvn would be available under Fink. With KDE 4, some KDE applications now work on Windows and Macintosh.
Other options[edit | edit source]
More clients are listed at http://subversion.tigris.org/links.html. There you will also find info on language bindings including PECL SVN and repository converters like cvs2svn
Client Credentials Caching[edit | edit source]
There is a section of the book that describes all the details of client credentials caching. In the user's private runtime configuration area (~/.subversion/auth/ for Unix-like systems or %APPDATA%/Subversion/auth/ on Windows) There really isn't a security concern here, so that's NOT why I'm mentioning it. Rather, if the user wants to authenticate as a different user than her system login name, or a script wants to authenticate without using cached credentials then you should look at information in the book on this topic.
Auto Properies[edit | edit source]
Please edit your svn client configuration to configure and enable 'auto properties'. See http://codex.gallery2.org/index.php?title=Gallery:Using_Subversion&printable=yes#Developer_Info
For further explanation and understanding of what Automatic properties are, see the section marked
enable-auto-props
in http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.advanced.confarea.opts.config
Note that you have to edit the file in two places... once in [auto-props]
for the property settings according to each file extension, and once in the [miscellany]
section for turning enable-auto-props on
E.g. less ~/.subversion/config
### Section for configuring miscelleneous Subversion options. [miscellany] ### Set enable-auto-props to 'yes' to enable automatic properties ### for 'svn add' and 'svn import', it defaults to 'no'. ### Automatic properties are defined in the section 'auto-props'. enable-auto-props = yes ### Section for configuring automatic properties. [auto-props] *.c = svn:eol-style=native *.cpp = svn:eol-style=native *.h = svn:eol-style=native *.dsp = svn:eol-style=CRLF *.dsw = svn:eol-style=CRLF *.sh = svn:eol-style=native;svn:executable *.txt = svn:eol-style=native *.png = svn:mime-type=image/png *.jpg = svn:mime-type=image/jpeg Makefile = svn:eol-style=native *.php = svn:keywords=Author Date Id Revision;svn:eol-style=native *.inc = svn:keywords=Author Date Id Revision;svn:eol-style=native *.class = svn:keywords=Author Date Id Revision;svn:eol-style=native *.tpl = svn:keywords=Author Date Id Revision;svn:eol-style=native *.html = svn:keywords=Author Date Id Revision;svn:eol-style=native *.css = svn:keywords=Author Date Id Revision;svn:eol-style=native *.js = svn:keywords=Author Date Id Revision;svn:eol-style=native MANIFEST = svn:keywords=Author Date Id Revision;svn:eol-style=native GNUmakefile = svn:keywords=Author Date Id Revision;svn:eol-style=native strings.raw = svn:keywords=Author Date Id Revision;svn:eol-style=native *.po = svn:keywords=Author Date Id Revision;svn:eol-style=native *.mo = svn:mime-type=application/octet-stream *.gif = svn:mime-type=image/gif
Quick Setup[edit | edit source]
- These are brief, inadequate details on using the command-line client or Tortoise SVN.
- Please take time to read more details in the fine manual for your software.
- You should create a base directory on your system called work (e.g. MyDocuments/work) which you will then use to store all your local working copies from the version control system.
TortoiseSVN client setup and checkout instructions.[edit | edit source]
TortoiseSVN is a Windows Explorer shell extension, generally accessed via the right-click context menu on Explorer windows (including your Desktop).
- If this is your first Subversion checkout, create a folder in Windows Explorer to hold all of your Subversion project folders. Then create a subfolder for this project.
- Use Windows Explorer to navigate to the folder created to hold this project.
- Select File - SVN Checkout.... The SVN Checkout dialog box will appear. (You may also access this dialog by selecting SVN Checkout... from the context menu presented when you right-click on your Explorer window's background.)
- Enter the URL of the repository e.g. http://example.com/svn/myrepo/
- Click OK
- If you are prompted for authentication information, you must provide your subversion system username and password.
- Toggle the "save authentication" option to govern whether or not your username and password will be stored on the computer you are using. If left unselected, future invocations of TortoiseSVN will prompt you again
for this information.
- Click OK.
- You will see list of files scrolling by as the project data is checked out into your folder.
- Repeat the project checkout process for each additional Subversion project you wish to check out.
Subversion command-line client setup and checkout instructions.[edit | edit source]
The Subversion command-line client (svn) is used at a command shell, such as in a Command Prompt window on the Windows(r) platform, or any number of available shells on a flavor of Unix.
- Use svn checkout to checkout code from a repository. The example shows a checkout of the MediaWiki project's main (trunk/) line:
svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3
- You will see list of files scrolling by as the project data is checked out into your folder.
- Repeat the project checkout process for each additional Subversion project you wish to check out.