Archive for the 'Personal' category

Migrate Visual SourceSafe to Git – A short how-to

November 30, 2013 1:35 am

My hobby/learning projects have been residing in a single-person SourceSafe database for a long time (yes, I know you’re laughing; I don’t care – for single-person projects it’s just fine and dandy.) It was time to start using something new. I wanted to migrate everything, including history, to git.

The first step was to install the latest version of git (Git-1.8.4-preview20130916) on the system that currently hosts the SourceSafe database. If you’re long-term-memory-capacity limited like me and can’t remember git command-line arguments to save your life, you’ll also install something like TortoiseGit while you’re at it. One important step is to choose to run git from the Windows Command line during setup. (The next step needs git in the PATH.)

The second step was to install vss2git (http://code.google.com/p/vss2git/). After some trial-and-error with converting my entire database (a mistake, by the way, see step three) and getting error messages about the log file, I changed the permissions of the install folder to allow “read/write” for every user.

The third step was to convert each main project in SourceSafe (well, via a copy of the SourceSafe folder, actually, just to be paranoid) to a git repository by making sure to use $/Path.to.project in the vss2git tool’s Project field.

image

The fourth step was to convert each of these newly created full repositories to “bare” repositories for sharing across my local network. The command line for that is

git clone –bare –no-hardlinks Path.to.project Path.to.project.git

And that’s pretty much it. A fifth, optional step is to remove the original repository folders that served as the source for the bare repositories (so they don’t clutter up the Windows file share).

I am now the proud “owner” of 13 brand-new, independent little git repositories!

[Update 2013-12-01]

Well, I wasn’t too happy with the above solution. It creates too many nested folders (partly because of how Visual Studio creates stuff in VSS in the first place.) Once I clone the resulting repo, I get something like:

CloneRoot/Uncorked.root/Uncorked.root

That’s not what I want. I need it to be CloneRoot/Uncorked.root at most.

This answer on a StackOverflow question provided a good path to take. Based on that answer, I cobbled together a .cmd file to process all my repositories:

@echo off
for /d %%d in (*) do (
  if not exist %%d\config (
    echo %%d
    cd %%d
    attrib -h .git
    move .git %%d/
    cd %%d/
    attrib +h .git
    git init
    git add .
    git commit -am "moved git root"
    cd ..
    git clone --bare --no-hardlinks %%d %%d.git
    move %%d.git ..
    cd ..
    rem pause
  )
)

nVidia nForce 430 (MCP51 / RTL8201CL) and SME Server 8.0: working!

September 1, 2013 8:04 pm

Lately, my home network started showing more and more signs of aging. Accessing websites was erratic, whether via wired computers or wireless devices. WiFi clients (which for some reason have almost exploded in number over time) couldn’t reliably connect, causing shouts of “Daddy, the Internet is down!” with regular occurrence, coming from various bedrooms. Something had to be done. And what better time for that than Labor Day weekend!

The last time I had undertaken a similar venture was at the end of November 2006. Shortly thereafter I started preparing for the next time this would need to happen. Well, here we are… I had set aside a pretty neat “mini” system and found the necessary half-height network card for it (SME Server systems need two network cards to act as server/gateway on a network). I had even installed SME Server 7.5.1 in preparation for the eventual migration (the newest version at the time). Unfortunately I never found a way to make the on-board network card work, so the machine just sat on the shelf for a few years, until now.

 

Transferring data from the old system's drive

The trick to making the on-board NIC work was to grab the RHEL 5 driver from nVidia’s site. Extensive searches (based on the “Onboard LAN” information on the motherboard information page) led me to this thread, pointing me to an older version of the driver. From there it was just a small hop to the most up-to-date driver package. The trickiest part was getting it onto the new system’s hard drive before hooking it up to the network. I found a USB flash drive, FAT formatted it, copied the driver to it, and then got it mounted on the SME system. Quite a refresher on working with Linux command-line programs!

Once I had the driver installed (rpm –ivh nvlan-rhel5-0.62-1.25.i686.rpm) and the system restarted, I was able to run through the SME configuration with dual NICs to make the system a “dedicated server gateway”. I was a little worried that it might not pick up an IP address from my cable provider, but I just needed to restart the cable modem as well, and after one more reboot (I think), everything was back up and running. Luckily I had given the new system a non-colliding internal IP address way back when I set it up the first time. It was a snap to set the range of DHCP addresses to a non-overlapping set.

To complete setup, I had to re-create user accounts, ibays, domains served, VPN access, etc. I also needed to install the latest updates to SME Server 8.0 and the two “contribs” I consider essential to SME Server: AWStats and Sme8admin.

All that was left now was moving the data off the old system. I started out doing that over the network, but it became clear that the old system was truly on its last breath. So I decided to shut it down and hook the old drive up to the new system via the USB bridge you see in the picture above. There were about 20 GB to copy, so it took a while. Once it was done (including historical web server statistics data for AWStats), there was still some work with setting the right permissions on files and directories.

But now it’s all done, and the new machine is humming (quietly) in the spot where the old system used to live!

To round out this tale, here are the traditional “nostalgia” shots of the decommissioned hardware:

Note the power supply off to the side    A look inside the old system    Under the power supply    NICs in the back

One thing I had completely forgotten about is that I had put quite a bit of work into trying to make the old system as silent as possible. As you can see from the first picture, I had taken the power supply out of the system and put it on some pieces of vibration-dampening synthetic foam strips. In addition I had mounted the hard drive using various pieces of professional grade foam strips:

Green and yellow foam    Yellow foam and mounting pads

Luckily the new system was designed for quiet operation, so it didn’t need any extra work. It’s amazing how much quieter it is – I can hardly tell it’s on right now!

My third Windows Phone 7 app, FotoMovr, featured in Marketplace

April 24, 2012 10:38 pm

Thanks to some awesome work from my partner in crime at Cricketsoft, Tom Allen, our co-developed app, FotoMovr is featured in the Windows Phone Marketplace today. Both on the phone, the Marketplace website, and in the Zune client. Here’s some evidence:

IMG_5752

That’s me holding up my phone, and in the background the emulator running the app. Incidentally, this picture was taken at the Silicon Valley Windows Phone Meetup, where Tom and I gave a short talk this evening about the app and the support we’ve received from Microsoft while developing it.

 

image

The Marketplace section of windowsphone.com.

 

image

And that’s the Zune Apps Marketplace page, which I gather has just been disabled, so I was really lucky to get this screenshot at the last minute.

Fun stuff! Please check out the app, and also my other two apps, “Open ” and “Countdown”, which I see just got a five star rating from a kind soul for the latest version. My friend Tom has another app in the Marketplace as well, called “Good Morning” aka. “GMSV EzReader”. A great little app that makes reading the Good Morning Silicon Valley blog from the San Jose Mercury News really nice on Windows Phone.

Steve Jobs

October 6, 2011 12:27 pm

StayHungryStayFoolish

From the Whole Earth Catalog October 1974, actually titled “Whole Earth Epilog”, Page 324. Founded by Stewart Brand.

Mentioned by Steve Jobs in his commencement address at Stanford University in 2005.