How to Checkout Source Code from SVN

On most days, installing software will be easy. You need only login to your server and use its package manager to install the latest applications. On other days, it may be a bit more difficult, particularly if you need to use experimental software that is not yet in your operating system’s package repositories. One common method of managing and updating source code is Subversion (SVN), and you can checkout code from SVN to use on your server.

To begin, login to your server via SSH and then follow these steps:

  1. Change to a directory where you want to store the downloaded files
  2. Checkout the code with this basic line:
    svn checkout http://node-name/repos/svn/trunk/parentPath/path
  3. Change to the newly created directory containing the source code
  4. Build the source code as you normally would (i.e. using cmake, make, etc.)

Alternatively you can abbreviate “checkout” to make the string shorter like this:

svn co http://node-name/repos/svn/trunk/parentPath/path

If you need a specific revision of the source code, you can add the “-r” option. For example:

svn co -r 701 http://node-name/repos/svn/trunk/path file-name

Subversion is only one of many source management systems that developers may use. Others include CVS and Git. You should always check the developer’s documentation for instructions on checking out their source code.