Get Started with Subversion using SvnX.
If you’re a developer, version control software allows you to track changes to your code. This is important for projects in which you work as a team, allowing you to track changes as they occur. While services like GIT are popular, especially for open source software, alternatives like Subversion (SVN) offer more control.
There are various SVN clients, but SvnX is a popular option for Mac users. We first touched on this simple, free, open source SVN client for Mac over a decade ago, with a host of new features and changes that have been something to dive into since. If you want to use SvnX, here’s everything you need to know to get started.
What is Subversion (SVN)?
Other types of version control, such as GIT, rely on a decentralized approach to version control. Each worker receives a copy of the code, they work on that code, and then the changes are made (committed) to the larger codebase.
Apache Subversion works differently. Instead of a decentralized approach, Subversion is centralized. There is only one central code repository where each developer works on their own parts. Each code revision is tracked and the ability to revert to previous versions is simplified.
This offers administrators more control, more security, and can make it easier to get started using the system. If you want a centralized approach, installing SvnX is your first step to using Subversion on a Mac. This client adds a graphical interface to a Subversion terminal application.
Install SvnX Subversion on macOS
Previous versions of SvnX required a manual installation of Subversion on macOS before the client worked. Fortunately, macOS now includes the latest version of Subversion, so this is no longer necessary.
To install and run the most recent version of SvnX, you need to install the Homebrew package manager for macOS. Other available versions of SvnX, including those featured on the “official” but long-abandoned SvnX website, simply won’t work with recent installations of macOS due to its older 32-bit status.
- If you don’t have Homebrew installed on macOS, open a terminal window and type / usr / bin / ruby ??-e “$ (curl -fsSL https://raw.githubusercontent.com/ Homebrew / install / master / install) ”to start the installation. Wait for the download and install script to complete and follow the instructions on the screen.
- After installing Homebrew, type brew cask install svnx in terminal and press Enter. The latest 64-bit version of SvnX available for macOS will be downloaded and installed. Homebrew will alert you when the installation process is complete.
- You can launch SvnX from Launchpad or by double-clicking an application in the Applications folder in Finder. However, the first time you do this, macOS will most likely block the attempt for security reasons.
You need to enable SvnX to run by clicking Launchpad System Preferences Security & Privacy and on the General tab click the Open Anyway button next to the SvnX launch warning.
- macOS will ask for final approval before launching. Click “Open” for SvnX to finally launch the application.
Once launched, macOS will allow SvnX to run without any additional security issues.
How to use SvnX Sabotage
When you start SvnX for the first time, you will see a fairly simple screen. On the left, two categories are listed called working copies and repositories.
Repositories are the central SVN servers that you connect to. The SVN repository contains all the files for your project. When you update a file, a new revision tag is added to it to distinguish between old and new copies of your repository files.
Working copies maintain local copies of the repository files. This allows you to make changes to your files locally before committing them to the repository. Files are usually split into different areas such as trunk (for stable copies), branch (for files in active development), and tag (for copies of the main repository).
- To add a new repository, click the “Settings” button in the left menu and click “Add Repository”.
- You will need to provide detailed information about your Subversion server in order for you to connect. Enter the SVN repository server in the URL field, giving the repository a memorable name in the Name field. If you have a username and password, enter them in the Username and Password fields.
- Once your data is in place, double-click the entry for your repository in the left menu, or click Details Update Now. This will open the access menu for your SVN repository, allowing you to access existing repository files and past versions, and make the necessary changes.
- If you would like to export a copy of your SV repository as a working copy for making local changes, select the revision (numbered in the Rev. column), then select the folder at the bottom of the screen.
To make a local copy, click the “Checkout” button in the upper right corner. Before clicking the “Checkout” button, confirm where you want to save these files.
- You can find more information about your saved working copy in the main SvnX startup window, which is listed under Working copies in the left menu. After making changes to your working copy of SVN, double-click the entry in the main SvnX launcher window.
In the Working Copy window that appears, select any folders or folders that you edited, then click Commit to save them as a new revision in the central SVN repository.
Each new revision you make will appear in the repository window for your SVN server. You can create new working copies on older revisions to fork your code and revert to an older version if you need to.
Active Version Control with SvnX
Unless you are using version control, every change you make to your code is final. You cannot move backwards and you cannot undo changes that you make further down the line. Using SvnX on the Mac helps address this problem by offering an easy and effective way to track code changes.
However, SvnX is a bit outdated, so feel free to use an alternative like Versions if it doesn’t suit you. Of course, you can’t run until you can walk, so if you want to learn how to program there are a number of services and applications that can help you.