% subversion
\svnidlong
{$HeadURL$}
{$LastChangedDate$}
{$LastChangedRevision$}
{$LastChangedBy$}
\svnid{$Id$}

\section{SVN Keywords}
SVN keywords are used to include parameters like author, version and date automatically in your plain text files (e.g. Python, Matlab, La\TeX).
If the specific tags appear in files, Subversion is able to fill in and maintain this information.
These tags are:
\begin{itemize}
\item \verb!Date!
\item \verb!Revision!
\item \verb!Author!
\item \verb!HeadURL!
\item \verb!Id!
\end{itemize}
When these tags are between \verb!$ $! signs \emph{AND} the file has the corresponding properties set, then subversion will complete the information as follows:
\begin{verbatim}
$Date$
$Revision$
$Author$
$HeadURL$
$Id$
\end{verbatim}
See also \url{https://wiki.documentfoundation.org/Svn:keywords} for more information.
Setting the related properties only needs to be done once for each file.
It can be done in two ways:
\begin{description}
\item[automatic] Properties of newly created files with particular extensions will automatically be set (see Section \ref{sec:svn_auto_props}).
\item[manual] Properties of new or existing files can be set or modified (see Section \ref{sec:svn_man_props}).
\end{description}

\subsection{Enable automatic properties in the config-file}
\label{sec:svn_auto_props}

First find the config file and open it with a text editor.
The location of the file varies across different platforms.
\paragraph*{Windows}
\begin{itemize}
\item Command line:
\begin{verbatim}
set
\end{verbatim}
\item Search for the location of APPDATA and go to the Subversion folder; this folder is:
\begin{verbatim}
C:\Users\<USERNAME>\Appdata\Roaming\Subversion
\end{verbatim}
\item Open \emph{config} with a text editor
\end{itemize}

\paragraph*{OSx / Linux}
\begin{itemize}
\item Open the config-file with a text editor. For example with \verb!vi! on the command line:
\begin{verbatim}
vi ~/.subversion/config
\end{verbatim}
\end{itemize}

\subsubsection{Adjust the config-file}
\begin{itemize} 
\item Remove the \verb!#! in front of \verb!enable-auto-props = yes! to enable this property
\item Create:
\begin{verbatim}
*.py = svn:keywords=Author Date Id Rev URL
*.m = svn:keywords=Author Date Id Rev URL
*.tex = svn:keywords=Author Date Id Rev URL
*.txt = svn:keywords=Author Date Id Rev URL
*.R = svn:keywords=Author Date Id Rev URL
\end{verbatim}
\end{itemize}
\subsection{Manually set svn:keywords property to a folder or file}
\label{sec:svn_man_props}
\subsubsection{Windows}
\begin{itemize}
\item Go to the folder or file, you want to modify, in your checkout
\item Right click and choose \emph{TortoiseSVN - properties}
\item Select \emph{new - keywords} and select the keywords you want
\end{itemize}
\subsubsection{Command line}
In command line:
\begin{verbatim} svn propset svn:keywords "Author Date Id Rev URL" folder/file location \end{verbatim}
