graham.reeds/

Setting up multiple Subversion repositories in Windows

September 28th, 2008 :: graham.reeds
Categories: Programming :: Subversion

Let’s face it – if you are looking at this right now the chances are you already know what Subversion is, so I will skip the tedious ‘yadda, yadda, free, yadda, yadda, great, yadda, yadda’.

So let’s take a look at setting one up – there are a lot of these, some good and some bad. Most go into details of setting up Apache and allowing you access from a small orbital platform stationed above Mars, but the chances you need remote access like that is minimal. If you do then I suggest you go read those – by the way they are only written by guys with beards.

The first thing we’ll do is download the latest Subversion Windows binary installer which is currently 1.5. In the future it will be different, but the concepts will probably remain the same.

Double click the installer and allow it to install naturally. Once that is complete we could run svnserve and be done, but it can be so much more beautiful. Let’s run it as a service.

Now Subversion has one slight annoyance. It has a global revision number. So if you have a single repository with multiple projects all projects will use the same incrementing revision system. That’s not particularly nice – especially when a single line change of code will result in a several hundred (or thousand) revision leap because of activity on another project.

So I prefer multiple repositories. It’s pretty easy to do. Let’s say you name your projects after famous marques. So let’s create a couple of projects:

svnadmin create "d:\svn\ferrari"
svnadmin create "d:\svn\bugatti"

I use D as my development drive and have short monikers for all my folders – \dev, \svn, \db, etc.

Notice svnadmin created a few directories under both ferrari and bugatti. You need to go into each of these and edit the conf/svnserve.conf and the passwd files.

Uncomment the following lines in the conf/svnserve.conf file by removing the pound character from the start of each line:

anon-access = none
auth-access = write
password-db = passwd

Since the chances of working with a harry and sally are next to nil, delete their lines from passwd and replace it with your own:

graham.reeds = password

You will need to do this for each as outside the aforementioned Apache there is no real way of doing that.

Now that is complete let’s perform the final step of installing Subversion as a Windows service so that it is always available. Under OS’s other than XP you will need to find sc.exe otherwise Just issue the following command:

sc create svnserver binpath= "c:\program files\subversion\bin\svnserve.exe --service -r d:\svn" displayname= "Subversion" depend= Tcpip start= auto
sc description svnserver "Subversion server service (svnserver)"

It’s set to auto-start so it will start up automatically when your machine restarts but currently it’s not running. We can fix that while still at the command line by typing:

net start svnserver

Now the final thing to do is set it up so that when we do a commit we have an editor to write the comments in. Since svn doesn’t provide one then we will need to provide our own. So lets edit your environment settings and add SVN_EDITOR with the value of %systemroot%\system32\notepad.exe.

You could use Notepad++ but simple notepad is way easier and Notepad++ is too heavyweight for this job. In this one case the traditional notepad is the better option.

Next time I will show you how to populate those repositories.

1 comment.

Windows XP Media Center Edition 2005

September 14th, 2008 :: graham.reeds
Categories: Leisure :: Life

Normally I have no troubles with installations of Windows, and I have very little trouble with drivers (the main cause of crashing on Windows) since I purchase mainstream brands (Creative, ATI, etc).

So I finally bit the bullet and purchased the OEM version of the above-mentioned software to replace the Windows 2000 Professional which I have been using for the past 6 years. That was what my previous post was alluded to. The oem version of MCE comes with 3 cds. These are Windows Media Center Edition Disc 1, Windows Media Center Edition Disc 2 and the Windows Media Center 2005 Update Disc.

Halfway through installation it asked for Windows XP Service Pack 2 CD. Umm…I didn’t get that with the OEM. I tried all CD’s that came with it but it still kept asking for that non-existant CD. Fortunately I have another machine so I did searches for the Service Pack 2 ISO, but only the x64 version is available in ISO form. I then downloaded the web distributable form and burnt the extracted software out to CD. This too failed. So I cancelled and it continued installing. The result was less than pretty: It was a mix of classic interface and the normal XP fisher-price one. I then used the CD I had burnt to install the Service Pack 2 – I had the forethought to include the original 266mb executable installer too. This too failed to work – it was complaining that the RPC server was not running. However a trip to Administritive Tools->Services showed it was going to start.

So I reformat and reinstall again. This time while I was waiting to get the ‘Insert SP 2′ message I looked on the net for similar problems – someone has had to have had this happen to them before, right? Well I was but the answer was in an unexpected source: Newegg.com.

Apparently the answer was to insert CD1 again. Eh? But I already tried that! But it was correct – that was the solution.

Then I spent the next few hours running updates and rebooting. Until Windows decided that all the critical installs were complete. Then it was on to the optional ones – one of which was software for my Audigy. When it came to the install it bluescreen. Nice.

Reboot showed no ill-effect, but no sound. Device manager said everything was running smoothly and the trouble-shooter also never helped.  Another few hours passed and I finally get sound working, but everything is loud, even when turned down to the 2 notch on Volume controls. I just wish audio would work. It took me ages to get W2K configured and I can see this taking a long time too – and I haven’t even started the actual Media Center yet…

Note: When collating the links for this post I see that they have discontinued MCE and suggest Vista Home Premium which I also looked at but couldn’t justify the £20 extra and the extra strain it will put on my ancient AMD 1600+. It now is cheaper than MCE by a couple of quid and probably easier to install too…

Update 2009/01/21: Since this is rapidly becoming the most visited page on my blog I thought I would put a summary of what to do here so you can get on with your life: When the installer asks you to put the SP2 CD in the drawer, place CD1 in the tray.

2 comments.

Unusual request

September 13th, 2008 :: graham.reeds
Categories: Leisure :: Life

I am looking for a copy of Service Pack 2 for Windows ISO image. Why? I bought a copy of Windows MCE OEM and the installer wants the SP2 cd rom – which never came with it. So I tried burning the downloadable SP2 to a cd (after extracting it) – which didn’t work either. So I want the actual CD. Or somewhere I can download the .iso from.

1 comment.

Week in the life…

September 6th, 2008 :: graham.reeds
Categories: Leisure :: Life

I went away for the better part of the week I had off.  What happened? Well about an hour before I left I failed my driving test due to a corgi running out in front of me in the Southbank area of Middlesbrough.

Mr Bear, Mrs Bear and Mummy Bear visited London while it was only an hour’s trip away. Went on the London Eye (very impressive ticket system), walked around the Dali Universe, then the London Aquarium and then took Mummy Bear to Cyberdog in Camden which I think she actually enjoyed.

Been working through the huge backlog of email and blog posts that have accumalated while I’ve been sans computer. I also went away just before Google Chrome was released – using it to write this post. Very impressive – be a real threat to Mozilla when they get the plugin’s ramped up. However I don’t like the fact that it installs itself into Documents and Settings instead of Program Files.

Tonight I am having a curry with friends but my actual birthday party is in October because not everyone can get together on any weekend before that!

2 comments.