The adventure of using Fast-Export on Windows.

During the school year I work part-time with several other computing students for a software engineering professor.  For our first week back, one of the tasks we were given was the take a mercurial repository that was hosted on Google Code and convert it to Git and host it on GitHub.  It was important to retain history as there had been many contributors and almost a thousand commits.

Googling around, I kept seeing one tool being mentioned frequently: Fast-Export.  I found this blog post that explained how to use it to convert a repo and although it was written with a Linux based OS in mind, I thought it’d be simple to do the same tasks in Windows. I quickly began running into problems though.  While I had TortoiseHG installed as well as a version of Python and Git, I began getting errors related to Python and Mercurial not being found.  Googling led me to this blog post where someone successfully used the tool on Windows. It seemed that I had to install a specific version of Python and “Mercurial for Python” which I guess was not installed with TortoiseHG.  I followed the steps on the blog, and when I tried to run the script it seemed that there were errors popping up in the code.

At this point I was frustrated, and I came upon a blog post of someone else who was frustrated…although significantly more so than I. I’ll be honest, the post made me laugh and I felt like I could relate a bit.  But at the same time I knew that the tool must actually work, because tons of people were praising it and recommending it. So I continued my hunt which led me finally to this Stack Overflow post about using Fast-Export on Windows.  The top rated comment said to install Cygwin and I was hesitant. I had been following the commands people said to use online, just performing the actions using a GUI. In theory, switching to Cygwin shouldn’t change anything.  I decided to give it a shot though.  I uninstalled Python and Mercurial since the post said I should get them with Cygwin, and then I followed the instructions for downloading.

Lo and behold, after downloading Cygwin with Python and Mercurial, and running the Fast-Export tool, I had a successfully converted repository. The only issue being that the author information is a bit off since some of the developers did not use the same e-mail that they are now using on GitHub, but a helpful member of the rit-foss irc channel on freenode directed me to this which explains how to retroactively update the author information.

There are a couple of things I took away from this experience. First of all, I believe the problems I was experiencing were likely due to not having the same exact setup of Python and Mercurial that developers using Linux distributions had.  I think Cygwin fixed this some how.

I think Fast-Export and other open source tools are really useful, but I also think that many of them are developed without much consideration of other operating systems, like Windows.  Which is fair, if someone is doing something out of the goodness of their heart no one has the right to say “Screw you, you have to make this work for me too!”.  But I do feel like it’d be beneficial to start including more instructions of how to use these tools with Windows, or how developers using Windows can work on the project.  I hope that does not come off as entitled, but I really think it’d help a lot of people who find operating systems to be a barrier of entry for open source.

Anyway, that is why I wanted to document my experience.  I hope this blog post can help anyone else who is having trouble getting this tool to work for them.

Leave a comment