How to Install Subversion on Mac OS X: 11 Steps

Table of contents:

How to Install Subversion on Mac OS X: 11 Steps
How to Install Subversion on Mac OS X: 11 Steps
Anonim

Subversion, sometimes called SVN, is an open-source program for managing changes (versions) made to files or folders. It is of great help if you want to keep track of how your documents have changed over time, or if you need to recover an old version of a particular file. Here are the steps to install Subversion on Mac OS X.

Steps

Method 1 of 2: Part One: Binary Package Installation

Install Subversion on Mac OS X Step 1
Install Subversion on Mac OS X Step 1

Step 1. Go to 'https://subversion.apache.org/packages.html# osx'

You will find a considerable number of packages to download, each with different requirements. Choose the one that best suits your needs.

Install Subversion on Mac OS X Step 2
Install Subversion on Mac OS X Step 2

Step 2. Unzip the contents of the '.pkg' file

An installation file will be created directly on your desktop. Select it with a double click of the mouse and follow the instructions that will appear on the screen and will guide you through the installation process.

Install Subversion on Mac OS X Step 3
Install Subversion on Mac OS X Step 3

Step 3. Open a 'Terminal' window

You can do this from the 'Utilities' folder. Alternatively, you can search with 'Spotlight' by typing 'Terminal'. In the terminal window, type the following command starting at the '[username] $' prompt:

  • 'svn' (without quotes) and press [enter]

    Install Subversion on Mac OS X Step 3Bullet1
    Install Subversion on Mac OS X Step 3Bullet1
  • If the response to this command is 'Type' svn help 'for usage', then SVN is working correctly.

    Install Subversion on Mac OS X Step 3Bullet2
    Install Subversion on Mac OS X Step 3Bullet2
  • If the system path '/ usr / local / bin' is unreachable, edit your '.profile' file and add the following line of code:

    Install Subversion on Mac OS X Step 3Bullet3
    Install Subversion on Mac OS X Step 3Bullet3

    'export PATH = $ PATH: / usr / local / bin' (without quotes)

  • Open another terminal window and type the 'svn' command again by pressing [enter].

    Install Subversion on Mac OS X Step 3Bullet4
    Install Subversion on Mac OS X Step 3Bullet4

Method 2 of 2: Part two: Set up the Subversion Environment

Install Subversion on Mac OS X Step 4
Install Subversion on Mac OS X Step 4

Step 1. Configure the SVN server

This step is necessary to allow users to access all projects managed with Subversion.

Install Subversion on Mac OS X Step 5
Install Subversion on Mac OS X Step 5

Step 2. Launch a 'Terminal' window and create a directory called 'svnroot' (without quotes) in your profile directory using the following command:

'mkdir svnroot' (without quotes).

  • Type: 'svnadmin create / Users / [your username] / svnroot' (without quotes)

    Install Subversion on Mac OS X Step 5Bullet1
    Install Subversion on Mac OS X Step 5Bullet1
  • Done! You have just created your SVN server.

    Install Subversion on Mac OS X Step 5Bullet2
    Install Subversion on Mac OS X Step 5Bullet2
Install Subversion on Mac OS X Step 6
Install Subversion on Mac OS X Step 6

Step 3. Use the SVN server from the terminal window. You can 'checkout' directly from the terminal using the following command: 'svn checkout file: /// Users / [your username] / svnroot' (without quotes).

  • If you want to remotely access your SVN server, enable the 'Remote Login' service by going to 'System Preferences / Sharing'. To 'checkout' a project remotely, use the following command: 'svn checkout svn + ssh: //my.domain.com/Users/ [your username] / svnroot'

    Install Subversion on Mac OS X Step 6Bullet1
    Install Subversion on Mac OS X Step 6Bullet1
Install Subversion on Mac OS X Step 7
Install Subversion on Mac OS X Step 7

Step 4. Configure the Subversion Client

For example the svnX client supports all versions of Mac OS X from 10.5 to 10.8. You can download it at the following link.

Install Subversion on Mac OS X Step 8
Install Subversion on Mac OS X Step 8

Step 5. Once the SVNx download is complete, launch it

You will be faced with two windows, one called 'Working Copies' and the other 'Repositories'. In this last window, you will need to add the URL and login details to your SVN server.

  • Open the window, if you get an error, check your login credentials (LogIn).

    Install Subversion on Mac OS X Step 8Bullet1
    Install Subversion on Mac OS X Step 8Bullet1
  • Return to the terminal window and type the following command: 'svn import -m "your import message" / local path / to / project / repository / on / server / SVN' (without quotes). This command will add all files of your project locally in the repository indicated on the SVN server.

    Install Subversion on Mac OS X Step 8Bullet2
    Install Subversion on Mac OS X Step 8Bullet2
  • In the SVNx 'Working Copy' window, add the path to the repository located on the SVN server.

    Install Subversion on Mac OS X Step 8Bullet3
    Install Subversion on Mac OS X Step 8Bullet3
Install Subversion on Mac OS X Step 9
Install Subversion on Mac OS X Step 9

Step 6. Enter SVNx 'Working Copy' window

It is in this window that you will be able to see the changes when you work on the project.

Install Subversion on Mac OS X Step 10
Install Subversion on Mac OS X Step 10

Step 7. Run control tests

Make small changes to the project from your 'Working Copy' window, then update the window display.

SVNx will show all files that have undergone changes. Press the 'Commit' button to copy the changes to the SVN server repository

Install Subversion on Mac OS X Step 11
Install Subversion on Mac OS X Step 11

Step 8. If you prefer to work on Subversion repositories directly through Finder, consider using SCPlugin or SVN Scripts for Finder.

Advice

  • The main documentation for learning about Subversion is the free book 'Version Control with Subversion', also known as 'The Subversion Book'. You can download a copy at this link
  • There is also some additional documentation which you can find in the '/ doc' directory of the Subversion source code. See the 'README' file in the 'doc' folder for more information.

Recommended: