<chunkynotes version="1.0" title="Subversion Tips">
   <summary>Subversion version control tips.</summary>

<intro>
</intro>

<chunk title="Checking out from a machine you have SSH access to">
<p>Construct the URL from protocol "svn+ssh", the hostname and the full path
to the repository and tree:</p>

<sample>
<cli>dleigh@:~> svn co svn+ssh://yallara/home/d/dleigh/repository/PP2B/ </cli>
<out>dleigh@yallara.cs.rmit.edu.au's password:
A  project/AUTHORS
A  project/code
A  project/README
A  project/style.txt
Checked out revision 4.
dleigh@:~>
</out>
</sample>

<p>You can commit, update and so on as normal - subversion will remember the
URL you used to access the repository.</p>
</chunk>

<chunk title="Keyword expansion">
<p>By default keyword expansion is disabled in subversion - you can
explicitly enable it per-file as follows:</p>

<sample>
<cli>svn propset svn:keywords "Id LastChangedDate Author" file1.c file2.java...</cli>
</sample>

<br/>

<p>You can enable it by default when adding certain filetypes by setting
   the following in your config file. In Unix, this is
   "<code>~/.subversion/config</code>"; in Windows, this is
   "<code>C:\Documents and Settings\[username]\Application
      Data\Subversion\config</code>", assuming user profiles are
   located in <code>C:\Documents and Settings</code>.</p>

<p>In <code>[miscellany]</code> section:</p>

<sample>
<src>enable-auto-props = yes</src>
</sample>

<p>In <code>[auto-props]</code> section:</p>

<sample>
<src>
*.c = svn:keywords=Id LastChangedDate Author
*.cpp = svn:keywords=Id LastChangedDate Author
*.java = svn:keywords=Id LastChangedDate Author
(etc...)
</src>
</sample>

</chunk>

<chunk title="Automatic commit email">
<p>In the <code>hooks/</code> subdirectory of your repository create a file
called <code>post-commit</code> (no extension) which should look similar
to:</p>

<sample>
<src>
#!/bin/sh

REPOS="$1"
REV="$2"

/full/path/commit-email.pl "$REPOS" "$REV" -s SVN:project-name user1@.abc.net user2@.abc.net...
</src>
</sample>

<p>This requires the commit-email.pl script that comes with subversion is
properly set up on your system. You can find it in
/usr/local/share/subversion/hook-scripts/commit-email.pl on FreeBSD
5.x.
</p>
</chunk>

</chunkynotes>
