<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4//EN"
"http://docbook.org/xml/4.3/docbookx.dtd"
[
  <!ENTITY project "Skolelinux">
  <!ENTITY dev "developer.skolelinux.no">
]
>

<article lang="en">
  <!-- $Id: subversion.xml 45411 2005-10-20 21:39:51Z sunny256 $ -->
  <articleinfo>

    <title>Subversion usage in &project;</title>
    <pubdate>$Date: 2005-10-20 23:39:51 +0200 (Thu, 20 Oct 2005) $</pubdate>

  </articleinfo>
  <section> <title>The repositories</title>

    <para>The repositories are available through two access methods:
    <literal>svn+ssh://</literal> for committers, and 
    <literal>svn://</literal> for read-only anonymous access.
    Using the main branch in the &project; repository as an example, 
    committers use the address 
    <literal>svn+ssh://<replaceable>username</replaceable>@&dev;/repos/<replaceable>repository</replaceable></literal> 
    and anonymous users use the address 
    <literal>svn://&dev;/repos/<replaceable>repository</replaceable></literal>.</para>

    <para>The following repositories are available:</para>

    <itemizedlist>
      <listitem>
        <para><filename>skolelinux</filename> (Main repository)</para>
      </listitem>
      <listitem>
        <para><filename>sandbox</filename> (For svn testing, does not 
        send commit mails)</para>
      </listitem>
      <listitem>
        <para><filename>cinelerra</filename></para>
      </listitem>
      <listitem>
        <para><filename>samba</filename></para>
      </listitem>
      <listitem>
        <para><filename>sql-ledger</filename></para>
      </listitem>
      <listitem>
        <para><filename>sql-ledger-old</filename></para>
      </listitem>
    </itemizedlist>

    <para>This is an example of a checkout of the main branch 
    (<filename>/trunk</filename>) in the <filename>skolelinux</filename> 
    repository:</para>

    <blockquote>
      <para><command>svn checkout 
      svn+ssh://<replaceable>username</replaceable>@&dev;/repos/skolelinux/trunk
      </command></para>
    </blockquote>

    <para>The same checkout as above, but using anonymous access:</para>

    <blockquote>
      <para><command>svn checkout svn://&dev;/repos/skolelinux/trunk
      </command></para>
    </blockquote>

  </section>
  <section> <title>Differences from CVS</title>

    <para>The user interface of Subversion is intentionally made quite 
    similar to <application>CVS</application>, with the same syntax 
    where possible.
    Describing the Subversion usage here is duplication of work, the 
    book <ulink url="http://svnbook.red-bean.com/"><citetitle 
    pubwork="book">Version control with Subversion</citetitle></ulink> 
    describes how to use it in great detail.
    <ulink url="http://svnbook.red-bean.com/en/1.1/apa.html">Appendix 
    A</ulink> (<citetitle pubwork="chapter">Subversion for CVS 
    Users</citetitle>) deals specifically with the differences between 
    CVS and Subversion.
    There is also a Norwegian version available, <ulink 
    url="http://svnbook.red-bean.com/index.nb.html"><citetitle 
    pubwork="book" lang="no">Versjonskontroll med 
    Subversion</citetitle></ulink>.
    Not fully translated, but complete.</para>

    <section> <title>Global revision numbers</title>

    <para>One of the biggest differences between Subversion and CVS is 
    the use of <firstterm>global revision numbers</firstterm> instead of  
    file-based revision numbers.
    Several changes, moves and copies can be collected in a single 
    commit. When possible, try to keep related changes and changes that 
    depend on each other in the same commit.</para>

    <para>The global revision numbers also makes it easier to see what 
    has happened in the repository recently.
    If you for example want to see what has happened since your last 
    update, run the following command before the <command>svn 
    update</command>, it will list all log entries from your last update 
    until repository <literal>HEAD</literal>:</para>

    <blockquote>
      <para><command>svn log -v -rBASE:HEAD</command></para>
    </blockquote>

    </section>

  </section>
  <!-- Commented out: The conversion from CVS to SVN
  <section> <title>The conversion from CVS to SVN</title>

    <abstract>
      <para>This section is kept only for historic purposes to document 
      which changes were made to the &dev; server to convert the CVS 
      repository to Subversion.</para>
    </abstract>

    <para>To make Subversion able to read repositories in the <ulink 
    url="http://svn.collab.net/repos/svn/trunk/notes/fsfs">FSFS</ulink> 
    format at least version 1.1 has to be installed, and Debian woody 
    has Subversion 1.0.0.
    The Apache httpd server is 1.3.26, and to use Subversion with Apache 
    at least 2.x s needed.
    To make the repository available to anonymous users, 
    <citerefentry><refentrytitle>svnserve</refentrytitle><manvolnum>8</manvolnum></citerefentry> 
    has to be used.
    This is a light-weight Subversion server which gives read/write 
    access to the repository with the <literal>svn://</literal> schema.
    It can be runned as a server in two ways, as a daemon or called by 
    <citerefentry><refentrytitle>init</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
    This section describes the installation of svnserve as a 
    daemon.</para>

    <procedure>
      <step>

        <para>Install the subversion package from <ulink 
        url="http://www.backports.org/debian/dists/woody/subversion/binary-i386/">backports.org</ulink>:</para>

        <procedure>
          <step>

            <para>Add this line to 
            <filename>/etc/apt/sources.list</filename>:</para>

            <programlisting>
deb http://www.backports.org/debian/ woody subversion
</programlisting>

          </step>
          <step>

            <para>Execute <command>apt-get update &amp;&amp; apt-get 
            install subversion</command></para>

          </step>
        </procedure>
      </step>
      <step>

        <para>Create a <literal>svn</literal> user, which is the user 
        <citerefentry><refentrytitle>svnserve</refentrytitle><manvolnum>8</manvolnum></citerefentry> 
        runs as, and has the ownership to the repository files.</para>

      </step>
      <step>

        <para>Insert these two lines into 
        <filename>/etc/services</filename>:</para>

        <programlisting>
svn     3690/tcp    subversion  # Subversion protocol
svn     3690/udp    subversion
</programlisting>

      </step>

    </procedure>

    <para>Users with commit access have to be a member of the 
    <literal>src</literal> group.</para>

  </section>
  -->
  <!-- vim: set fenc=UTF-8 ft=docbk tw=72 et ts=2 sw=2 sts=2 fo=tcqw fdm=syntax fdl=1 : -->
</article>

