<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[onecolumn,letterpaper,11pt]{article}

%===================================================================
\input{common_latex/common_latex_packages}
\input{common_latex/common_latex_definitions}
\input{common_latex/common_latex_help_format}
%===================================================================

\begin{document}

\begin{labcover}
\labtitle{Help Topic: Getting Started with SVN}
\vspace{0.1in}
\labdate{Spring 2021}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Department of Mechanical Engineering}
\labauth{MIT, Cambridge MA 02139}
\labline
\end{labcover}

\wikidoc{file=Help.SVNInstallCo}
\wikidoc{auth=mikerb@mit.edu}

%====================================================================
\section*{Getting Started with Subversion (SVN)}
%====================================================================

Subversion (SVN) is a version control software that allows users
to develop source code in a distributed manner, keeping track of changes,
conflicts and versions. You will be highly encouraged to use SVN or a
similarly capable version control tool during the course. But for now,
we focus just on installing SVN and knowing just enough to check out
software from the web to be used in the course.

\pskip
\noindent
Note: Subversion is the full software name, but the executable is \cmd{svn}.

%---------------------------------------------------------------------
\subsection*{How to tell if subversion is already installed}

Your machine may already have a version of \cmd{svn} installed. To
check, try:

\vspace{0.15in}
\begin{consoleverb}
 $ which svn
 /usr/local/bin/svn
\end{consoleverb}
\vspace{0.15in}

\noindent
If you get a response like the one above, you're all set. If \cmd{svn}
is not installed you will get a response like the one below:

\vspace{0.15in}
\begin{consoleverb}
 $ which svn
 svn: Command not found
\end{consoleverb}
\vspace{0.15in}

\noindent
If the \cmd{which} command is telling you the cannot find
the \cmd{svn} command, you probably just don't have \cmd{svn}
installed. However it may be that you simply don't have the
directory containing the \cmd{svn} executable in your shell path. To
rule this out, try the following (if using GNU/Linux):

\vspace{0.15in}
\begin{consoleverb}
 $ cd /usr/bin
 $ which ./svn
 ./svn
\end{consoleverb}
\vspace{0.15in}

\noindent
or (if using OSX):

\vspace{0.15in}
\begin{consoleverb}
 $ cd /opt/local/bin
 $ which ./svn
 ./svn
\end{consoleverb}
\vspace{0.15in}

\noindent 
If you see the above, it is simply a matter of adding directory
to your shell path. Do this now, or see the help topic on augmenting
your shell path:

\urlxx{http://oceanai.mit.edu/ivpman/help/help-add-shellpath}

%--------------------------------------------------------------------
\subsection*{Getting subversion in GNU/Linux}

If you're running GNU/Linux you probably have access to a package
manager such as \cmd{apt-get} and already know how to use it to some
degree. To install packages like Subversion, you need root
privileges. Assuming your user accont has root privileges, do the
following, and enter your normal login password if prompted:

\vspace{0.15in}
\begin{consoleverb}
 $ sudo apt-get install subversion
\end{consoleverb}
\vspace{0.15in}

\noindent
See the discussion above on how to confirm whether \cmd{svn} has been
successfully installed, and adjust your shell path if need be.

%--------------------------------------------------------------------
\subsection*{Getting subversion in OSX}

If you're running on a Mac (OSX) you can use MacPorts to install
subversion. If you haven't installed MacPorts, see the separate help
topic on this.  To install packages like Subversion, you need root
(admin) privileges. Assuming your user account has admin privileges,
do the following, and enter your normal login password when or if
prompted:

\vspace{0.15in}
\begin{consoleverb}
 $ sudo port install subversion
\end{consoleverb}
\vspace{0.15in}

\noindent
See the discussion above on how to confirm whether \cmd{svn} has been 
successfully installed, and adjust your shell path if need be.

%--------------------------------------------------------------------
\subsection*{Using Subversion to check out a repository}

The Subversion executable is \cmd{svn} and takes a number of arguments
on the command line for interacting with a software repository. The
most essential is the command to \cmd{checkout}, i.e., download, a
repository from a server.

\vspace{0.15in}
\begin{consoleverb}
 $ svn checkout url
\end{consoleverb}
\vspace{0.15in}

\noindent
Many of the \cmd{svn} commands have a shorthand version. For example,
\cmd{co} is shorthand for the \cmd{checkout} command. Below is the \cmd{svn} 
command for checking out the MOOS-IvP software tree:

\vspace{0.15in}
\begin{consoleverb}
 $ svn co https://oceanai.mit.edu/svn/moos-ivp-aro/trunk/ moos-ivp
\end{consoleverb}
\vspace{0.15in}

\noindent
A checkout essentially results in the download of a directory from a
server.  The name of this directory is the component after the last
slash character in the URL. In the above example, this
would \var{trunk}.  The last (optional) argument in the above example
command line, \var{moos-ivp}, is the name you would like the directory
to have upon download.

\noindent
More can be learned about Subversion online. There are numerous help
pages, cheat sheets, and the official Subversion book is even free online.
On this course website we do have a few help pages of our own you can
check out:

\vspace{0.05in}
\begin{packed_itemize}[2]
\item \urlx{http://oceanai.mit.edu/ivpman/help/svn_info_log_cmds}
\item \urlx{http://oceanai.mit.edu/ivpman/help/svn_update_cmd}
\item \urlx{http://oceanai.mit.edu/ivpman/help/svn_status_cmd}
\item \urlx{http://oceanai.mit.edu/ivpman/help/svn_add_remove_cmds}
\item \urlx{http://oceanai.mit.edu/ivpman/help/svn_mv_cmd}
\item \urlx{http://oceanai.mit.edu/ivpman/help/svn_commit_cmd}
\item \urlx{http://oceanai.mit.edu/ivpman/help/svn_setup_your_own_repo}
\end{packed_itemize}


\end{document}

</pre></body></html>