svn server

  1. Fedora 10 svnserve version is 1.6 , and Ubuntu 8.10 is 1.5. If you copy your svn repository from 1.6 format to 1.5.
    Client will get error message "SVN Error: Expected fs format between ‘1’ and ‘3’; found format ‘4’".
    You can cat your svn repository format
    $ cat repos/db/format
    4
  2. You need to upgrade your subversion package to 1.6. You need add the backports to your apt list.Then install the new subversion package from packports.
  3. 1. Add this line
    deb http://www.backports.org/debian lenny-backports main contrib non-freeto your etc/apt/sources.list.
    2. Run apt-get update
    3. All backports are deactivated by default (i.e. the packages are pinned to 1 by using NotAutomatic: yes in the Release files, just as in experimental). If you want to install something from backports run:
    apt-get -t lenny-backports install subversion
  4. Run the svnserve
    #svnserve -d -r /mnt/sda/SvnRepos
  5. Start svnserve when booting
    Step 1 – Create your script.
    Simply create a new file (I called mine svnserve) and type the command you’d like to run
    cd /etc/init.d/ # (thanks Alfonso)
    sudo touch svnserve
    sudo vi svnserve
    svnserve -d -r /usr/local/svn/repository_name
    Step 2 – Save the script in the /etc/init.d/ folder
    Step 3 – Make the script executable
    sudo chmod +x svnserve
    Step 4 – Add the script to the boot sequence
    sudo update-rc.d svnserve defaults
    That’s it. When you’re done you should see some output similar to

    Adding system startup for /etc/init.d/svnserve ...
    /etc/rc0.d/K20svnserve -> ../init.d/svnserve
    /etc/rc1.d/K20svnserve -> ../init.d/svnserve
    /etc/rc6.d/K20svnserve -> ../init.d/svnserve
    /etc/rc2.d/S20svnserve -> ../init.d/svnserve
    /etc/rc3.d/S20svnserve -> ../init.d/svnserve
    /etc/rc4.d/S20svnserve -> ../init.d/svnserve
    /etc/rc5.d/S20svnserve -> ../init.d/svnserve
  6. Reference
    1. Debian Backports
    2. Upgrade procedure
    3. Start svnserve when booting

留言