Posted by & filed under Programming.

It’s no secret. Even Microsoft’s Steve Ballmer said that the latest Windows Vista is a “work in progress”. I was hoping that at least some of the problems, such as extremely slow file transfers & operations, network connection issues, and others, would be fixed in Service Pack 1.

Of course, SP1 release itself was plagued by issues, which caused Microsoft to pause automatic installs through Windows Update several times (it is for this reason I always turn off automatic updates). So finally, thinking they’ve resolved the issues, I got the balls to install SP1 on my Asus R1F laptop. The install took forever – I could have installed XP on another PC in the time it took to install SP1 – but was mostly automatic, so required no intervention. Imagine my surprise when I tried working with some files on my home network, to find the speed to be about the same as before the upgrade! VPN was still painfully slow, and it appeared no issues were addressed at all!

That’s not all. All of a sudden, the laptop started crashing every fifteen to twenty minutes, for no apparent reason. This only happened when it would be running on battery power, and often happened in the middle of work, making me lose all unsaved changes, and corrupting files processing at the time of freeze up. There was no blue screen message, no entry in the windows event log – nothing. After not receiving any help from Asus/AMD, I uninstalled SP1, using Microsoft’s helpful guide here. The problem went away.

So let me get this straight – the latest Vista is worse than unpatched Vista, which in turn is worse than Windows XP… Thank you Microsoft for redefining “progress.”

Posted by & filed under Programming.

Recently I had to set up a subversion hook, and found the documentation a bit lacking. So, here is a guide, that will hopefully help someone.

What: I have a subversion repository for a website, which I would like to be able to test. So upon a commit to the repository, a website on the same server should be updated as well. The official FAQ pointed me in the right direction – using a post-commit hook, however many details were left out.

How: I assume your repository is already set up at /path/to/rep, and your web site is located at path/to/web. What we first need to do, is checkout the contents of repository into the website, by running the following:
svn checkout http://localhost/project/branch /path/to/web
At this point it is a good idea to modify config files with information such as DB access info, and other installation specific settings, which shouldn’t be overwritten in the future.

Now for the tricky part. To make the site update upon every commit you need to set up a post-commit hook. You will find a template for such a hook in /path/tp/rep/hooks/post-commit.tmpl Open the file and replace whatever command is at the bottom with the following:
/usr/bin/svn update /path/to/web
This line will execute every time something is committed to the repository. Make sure to have the correct path to svn! Rename post-commit.tmpl to post-commit, and you’re ready to go!

Problems: This might not be enough, depending on the way your server is set up. If subversion doesn’t have write access to apache files, you will need to set up an external batch file, as described in the FAQ. There may be other problems utilizing the hook, in which case you should check this and follow the steps to get your hook working. This was not enough for me.

The problem I ran into, is that the hook did not seem to execute. It ran fine from a command line, but nothing was done automatically. There was no log file to point me to the issue either.

To debug the issue I renamed the original hook into post-commit-run, and modified the original one to do the following (using this as a tip):

exec $1/hooks/post-commit-run %* > $1/hooks/post-commit.log 2>&1

This will direct all output during hook execution to the log file. Making sure I set the correct permissions to the hooks and the log file, I did a commit. The log entry then led me to authentication problems, which were easily solved.

This will work on a *nix server, but the procedure should be very similar in a Windows environment. There are plenty of resources on the net about that.

Posted by & filed under Uncategorized.

This is my first blog post. This marks the official opening of my blog!

We’ll see where this goes…