Import VSS to Subversion

Recently I’ve been dealing with a codebase sitting in a Visual Source Safe 6.0 repository and to keep it brief and polite we’ll say it hasn’t been anything approaching “fun.”  For anyone interested, I found a handy and effective way to convert an entire VSS repository to SVN.

First go grab the newest version of VssMigrate from Codeplex. I don’t know why the author prefered to keep the newest version on Codeplex as opposed to Google Code, but I’ll leave opinions for another time. VssMigrate does a pretty great job of converting repositories once you get it properly configured. The only issues I had are as follows.

If you get an issue about the SourceSafeTypeLib not being found (usually error 80040154), that means you need to register VSS’s ssapi.dll. This should do the trick:

regsvr32 C:\Program Files (x86)\Microsoft Visual SourceSafe\ssapi.dll

If you still get an issue, then you are probably running 64bit Windows. Just change the target platform of the project from “Any CPU” to “x86”.

The only other significant issue I had was in importing the entire repository at once. I didn’t want to bother with importing a single project or just a couple of projects. I wanted to move the whole thing. To do this you just need to remove some of the error checking. As of version you just need to comment out the lines around Program.cs:623-627 and Program.cs:673-681. Specifically these are the lines that verify that you filled in VSSPROJ and SVNPROJ. Then set VSSPROJ to “$/” and you should be set.

Also be sure to change “PerformImport” to “True” and to use a local subversion repo, and set the SVNREVPROPSPATH so  VssMigrate can alter the timestamps and authors.

Read More

GNU Patch in Windows 7 or Vista

I just had a little fight with Windows 7 about permissions. It seems that it demands that any executable with the word “patch” in the name must be run with administrative privileges. After fighting with it for a few minutes about the absurdity of the problem, I resorted to a simple hack.

  1. Rename patch.exe to patsh.exe.
  2. Then create patch.bat in the same directory containing the following command:
    @patsh.exe %*

You will never notice a difference, and Windows 7 can go politely F*** itself.

Read More

Barefoot Running

A while back I read an interesting article about the Tarahumara in Mexico and their running style. Seems they are widely reputed for there ability to run for extreme distances. They are known to run hundreds of miles, or for days on end. More amazing than that though, is the fact that they do it all barefoot. No hi-tech Nike’s for them, just the amazing machine that is the human foot.

The basic style is that you run on the balls of your feet instead of landing on your heels and rolling to your toes. Modern shoes prevent running on your toes, unless you are perhaps at a full sprint. Interestingly, the barefoot running style allegedly also helps prevent many common running related injuries. People who run barefoot generally have fewer problems with shin splints, ankle problems and knee problems.

Vibram FiveFinger KSO

Recently I started mulling over the concept again, and wondered what a shoe would look like that allowed you to run as though you were barefoot, but still gave you some protection. I played with the idea a bit, and then searched to see if anyone had made it yet. Turns out the awesome people at Vibram beat me to it with the Five Finger.

I haven’t been able to jog in about a year, because of back problems that are aggravated by the impact of traditional jogging styles. Wearing these shoes, though, I have been able to run 10x as far and still no back pains. Best. Purchase. Ever.

IANAMD, but if you cannot run because of chronic pains in your ankles/knees/back then perhaps you should give them a shot.

Read More

Accessing SQLite databases in C++ using SOCI

I recently decided to use SOCI and SQLite at work and found that neither there is not a super straight forward path for setting this up. As of SOCI version 3.0.0 there is no support for Visual Studio 2008, so I had to convert and fix a few bugs resulting from that. There were some path issues as well. Also they don’t package the SQLite interface with SOCI so you have to checkout the repo to get access to it. After getting that there are still a few snags, not to mention actually setting up SQLite as a library.

[Updated: 10/13/2009]
After writing this article the SOCI team has resolved some of these issues, so some of these steps are no longer necessary.

Read More