KallistiOS: Subversion




Last Updated December 30, 2011


Intro

In ancient times passed, before SourceForge had public Subversion hosting, KallistiOS was hosted with a rather bizarre Subversion setup that was detailed on this page. Outside of this introductory paragraph this page has not been updated since October 23, 2003, so you can pretty much ignore the old stuff unless you are interested in ancient history. If you're looking to get a hold of a Subversion snapshot of KallistiOS, its as simple as pulling it from the SourceForge project's Subversion. Go here for help with that.

Without further ado, here's the ancient history lesson. :P


Old Intro

Unfortunately two factors have conspired to make it so that we can't provide a public Subversion server for everyone to access:

  1. Subversion is still not in a "stable" state;
  2. SourceForge does not provide Subversion hosting, and providing Subversion hosting requires a custom Apache 2.0 server or a cvspserver-like service.

As I do not have the resources to provide Subversion hosting on my own, I have opted for a "push" model for Subversion development. What this means is that each time a developer checks in a new revision into my local repository, a changeset dump will be generated and posted on this web site. You can then download these dump files and maintain a private Subversion repository. In this way, you get the latest updates most accurately, and you also have access to the full revision history.

I'm aware that there may be some utilities already written to handle and automate this process, but I have written my own.


Initial Stuff

A couple of things up front, including system prerequisites.

First of all, you need a Subversion client. You will need both the "svn" program, and the "svnadmin" program. These programs can be obtained here. Windows/Cygwin users can get "svn-win32-0.30.0.zip" or "svn-0.30.0-setup.exe", or whatever the latest versions of those are. Debian "sid" or "unstable" users can just "apt-get install subversion". Make sure that after the install, svn and svnadmin are in your path.

Windows users will generally need Cygwin with "bzip2" installed to make this work. You generally need Cygwin to develop with KOS anyway, so you probably have this. But make sure you have "bzip2" installed as well. It's possible to make this work without Cygwin, but you're pretty much on your own at that point.

Doing this will require about 150MB of disk space initially. After trimming back the repository this can be lowered to about 110MB if you need the space back.


The Easy Way

If you have Python installed (I'm using 2.3.1) then you have a super easy setup task. Grab this script and also this script. Make an initial repository with svnadmin (see "Create a shell repository" below). Then run svnpull.py on it, something like this:

svnadmin create kosrepo
svnpull.py kosrepo http://gamedev.allusion.net/svn/

Note that the path ("kosrepo") is passed directly to svnadmin. So if you are using the Win32 Subversion client, this needs to be a Windows-style path. See below for more info on that confused sillyness... Relative paths are ok, that is perhaps easiest.

Wait for a few minutes, and you should be all ready to go! You can run this same script with the same parameters as much as you like, to check for and apply new updates.

Here are the manual setup directions though, in case that doesn't work for you...


Doing The Initial Import

Here are the steps you will take to get your private SVN repository (repo) going. This generally only needs to be done once.

  1. Create a shell repository.
    • Pick a place for your repository. Under Unix this would be a path like /foo/bar/kosrepo. Under Windows you'd use something like c:\foo\bar\kosrepo.
    • Create a repo with with svnadmin:
      svnadmin create /foo/bar/kosrepo
    • Or for Windows,
      svnadmin create c:\foo\bar\kosrepo

      Note that if you are using Cygwin you'll need to enclose Windows-style paths in single-quotes, like:
      svnadmin create 'c:\foo\bar\kosrepo'
  2. Download the latest repository base revision and any incremental ones.
  3. "Load" your repository with the downloaded goodies.
    • bzip2 -cd 26_full.dump.bz2 | svnadmin load /foo/bar/kosrepo
    • bzip2 -cd 27_incr.dump.bz2 | svnadmin load /foo/bar/kosrepo
    • ...
    • Under Windows, use the Windows-style paths to your repo as discussed above.
    • The final message should be something like:
      ------- Committed revision 27 >>>
  4. Check out a copy of the tree from your local repo into a working dir.
    • Pick a place on your HD. I will use "/foo/bar/kos".
    • svn co file:///foo/bar/kosrepo /foo/bar/kos
    • Or for Windows,
      svn co file:///c:/foo/bar/kosrepo c:\foo\bar\kos
    • The final message should be something like:
      Checked out revision 27.

Congrats, you are now setup and should be ready to rock! Note that the "*" in the "download" step above denotes a version ID (I was at 26 when I wrote this doc). Any time I post new updates, you can follow a very similar (but MUCH simpler) process to bring yourself up to date.


Subsequent Imports

  1. Download the latest incremental versions.
  2. "Load" your repository with the downloaded goodies.
    • bzip2 -cd 28_incr.dump.bz2 | svnadmin load /foo/bar/kosrepo
    • ...
  3. Update your working copy.
    • cd /foo/bar/kos
    • svn up

I will periodically upload new full dumps for people just getting started. I'll keep incrementals back to the last full dump for people who are behind. If you get more than a full dump behind, you'll have to start at square one up there with your repo (but I think you can safely keep your working dirs just fine).

To figure out what version you currently have, make sure you have done a "svn up" in your working dir (/foo/bar/kos above) and then:

svn status -uN .

This will tell you a number like "27":

Status against revision:     27

If there are revisions above your number in the web dir I listed above, you'll need to grab them and patch up your repository.


Further...

I'd like to get Cygwin binaries for svn and svnadmin. For now it'll have to be done using the Win32 binaries.


Repo Cleanup

If you want to reclaim a bit of used space, use the "svnadmin list-unused-dblogs" command on your repo. This will print a list of files that can be deleted "safely" (I have had a few issues with this, but your milage may vary). A Cygwin command that can do this for you:

for i in `svnadmin list-unused-dblogs /foo/bar/kosrepo`; do \
	echo rm -f `cygpath -u $i`; done

When you think it looks right, remove the "echo" and it'll act. You can also replace the -f with -i to have it prompt for each file.


Problems?

I know this is a big pain in the rear, but hopefully someone will step up and provide Subversion hosting for free software projects some time soon. In the mean time, if you have problems with the above, please join the main KOS mailing list and post there. You can find info on KOS on the main KOS page.