As of July 2012, FreeBSD uses Subversion as the only version control system for storing all of FreeBSD's source code, documentation, and the Ports Collection.
Subversion is generally a
developer tool. Users may prefer to use
freebsd-update (Section23.2, “FreeBSD Update”) to update
the FreeBSD base system, and
portsnap (Section4.5, “Using the Ports Collection”) to update the FreeBSD Ports
This section demonstrates how to install Subversion on a FreeBSD system and use it to create a local copy of a FreeBSD repository. Additional information on the use of Subversion is included.
Installing security/ca_root_nss allows Subversion to verify the identity of HTTPS repository servers. The root SSL certificates can be installed from a port:
make install clean
or as a package:
pkg install ca_root_nss
A lightweight version of
Subversion is already installed
on FreeBSD as
svnlite. The port or package
version of Subversion is only
needed if the Python or Perl API is needed,
or if a later version of Subversion is desired.
The only difference from normal
Subversion use is that the command
svnlite is unavailable or the full
version of Subversion is needed,
then it must be installed.
Subversion can be installed from the Ports Collection:
make install clean
Subversion can also be installed as a package:
pkg install subversion
To fetch a clean copy of the sources into a local
svn. The files in this
directory are called a local working
Move or delete an existing destination directory before
checkout for the first time.
Checkout over an existing
svn directory can cause conflicts
between the existing files and those brought in from the
URLs to designate a repository, taking the
The first component of the path is the FreeBSD repository to
access. There are three different repositories,
base for the FreeBSD base system source code,
ports for the Ports Collection, and
doc for documentation. For example, the
specifies the main branch of the ports repository,
A checkout from a given repository is performed with a command like this:
svn checkout https://svn.FreeBSD.org/
repositoryis one of the Project repositories:
branchdepends on the repository used.
docare mostly updated in the
basemaintains the latest version of -CURRENT under
headand the respective latest versions of the -STABLE branches under
lwcdiris the target directory where the contents of the specified branch should be placed. This is usually
This example checks out the Ports Collection from the
FreeBSD repository using the HTTPS
protocol, placing the local working copy in
/usr/ports is already
present but was not created by
remember to rename or delete it before the checkout.
svn checkout https://svn.FreeBSD.org/ports/head /usr/ports
Because the initial checkout must download the full branch of the remote repository, it can take a while. Please be patient.
After the initial checkout, the local working copy can be updated by running:
/usr/ports created in
the example above, use:
svn update /usr/ports
The update is much quicker than a checkout, only transferring files that have changed.
An alternate way of updating the local working copy after
checkout is provided by the
SVN_UPDATE and use the
update target. For example, to
make update SVN_UPDATE=yes
The FreeBSD Subversion repository is:
This is a publicly accessible mirror network that uses GeoDNS to select an appropriate back end server. To view the FreeBSD Subversion repositories through a browser, use https://svnweb.FreeBSD.org/.
HTTPS is the preferred protocol, but the
package will need to be installed in order to automatically