Moving a Project From Subversion to Git

Apr
07
2009

I’ve been interested in the stuff that I’ve heard about git since hearing that Linus Torvalds was ditching BitKeeper and writing his own replacement to handle version control for the Linux kernel. I’ve taken a look at it a few different times as it’s profile grew in the Rails/Perl/etc communities.

Every time, there was something that kept me from adopting it: the state of Windows support. And, after this past week, I think that my focus on the msysGit version was part of the problem. I have been reluctant to use the Cygwin version. That is mostly because I didn’t want to *have* to install all of cygwin on any workstation where I want git support and the pile of files that adds.

The thing is, though, that when I took a good look last week, I already had cygwin running on every single Windows machine I’ve got, INCLUDING virtual machines. Never one to cling to a supposition after evidence invalidates it, I gave git on cygwin a shot.

Because I still have lots of Subversion repositories and am likely to continue using it on lots of projects, I insisted on getting the git/Subversion integration working. Also, I use a Dreamhost account to host my repositories and any project-related forums, project tracking, etc., as a sort of private Sourceforge/Codeplex/Google Code without any licensing issues to deal with. I wanted to add git support to that existing project space.

It turned out like most projects of this sort. The stuff I thought would be a pain (like getting git running on the Dreamhost account) turned out to be documented and straightforward, while stuff like getting the “git svn” command to work (which should just work off the cygwin install) thwarted me for far too long.

Set up your own private project server with git, Subversion, etc. at Dreamhost and use the code GLASSTOOBIG to skip the setup fee.

However, after I worked out the kinks, I was able to get it working and pointed at some of my Subversion repositories on several of my workstations. After cloning those repositories, what I'm most suprised by (even though I was told to expect it) is how git manages to copy ALL of the version history for the entire repository into a single .git directory (instead of hundreds or thousands of .svn directories) and end up with something SMALLER than the single version checkout of Subversion for the same source tree.

As an example, one of my repositories had 440 revisions across 10 branches. A checked out copy from Subversion of the current release branch is 2.51GB in 43,655 files across 23,361 folders.

After moving it to git, the checked out copy, which now includes the ENTIRE 440 revision archive of project history is 1.51GB in 15,356 files and 2,233 folders.

As far as the hiccups, it boiled down to a couple of things:

  1. Make sure to install all of the “git” related packages in cygwin.
  2. Install the subversion libraries for perl (they’re not anywhere near the “git” packages in the cygwin installer). This took care of it complaining about the SVN CPAN Perl library.
  3. Be prepared to have to run “rebaseall” on the cygwin installation.  This took care of a LOT of cygwin complaints about various DLL’s.
  4. Running “git svn clone http://example.com/repos/” can be agonizingly slow on large repositories. It’s not an issue if you’re working off of a tiny project, but that 1.5GB project took all night and then some. Ongoing work is quite fast, so I’m hoping they work the kinks out of this going forward or that they’ll ditch the tagline “The fast version control system”.

Given how efficient it is with storage, I’m interested in experimenting with running it in the background on my development directories and having a FileSystemWatcher commit whenever things change. I’d like to see how long it takes before things get out of control.

I’m also hoping that the GUI tools catch up. That’s not so much because I want them for myself (I prefer commandline for SVN as well), but because TortoiseSVN has been key in getting SVN adopted on projects and flushing SourceSafe on several of my projects.

Standardized ASP.NET MVC Controller Actions with Visual Studio Item Templates

Sep
07
2008

First, I think that this may be the longest title for any post on this site. I ditched 2-3 other variations for the only one that accurately describes this post.

Anyway, over the last couple of months, I've been working on getting better with screencasting tools. I learned a lot doing the last one and took that into the tinkering I've done with another one over the past week or so.

It stretched out over that timeframe because of a bunch of other stuff going on as well as some time spent on one-time tasks, like creating a Keynote theme to use for future screencasts that's a bit better thought out than the one I used on the last screencast. This look is something I'm much happier with and gives me a basis for more consistent look and feel going forward.

There's none of my shining face because I lent my webcam to a friend. I do see the value in adding that to the recording, but am not sure the best way to do it.

Anyway, on to the topic I actually covered in this video.

In ASP.NET MVC, the Controllers often end up with an Action method for all of the really common bits of functionality: Create, Insert, Update, Delete, etc. Stephen Walther put together a list of suggested standardized naming and usage for these Actions and I've been using them in the couple of ASP.NET MVC projects I'm working on.

In the process, I created a Visual Studio Item Template to make creating a new Controller that follows that convention easy. When I showed it to a co-worker, he expressed interest in how I did it and I saw an opportunity to explain something that's actually useful.

So, if you've ever wondered how to get your own templates into that Visual Studio "Add New Item" dialog box next to "Class Library", "Application Config File", etc. This is the screencast for you.

Anyway, give it a watch and let me know what you think.


Creating Visual Studio Item Templates from J Wynia on Vimeo.

Dynamic Font Replacement: sIFR, FLIR and More

Aug
22
2008
numeral types
Creative Commons License photo credit: threedots

A couple of weeks ago, Antonio Lupetti shared a list of 10 "handwritten" fonts that he uses in his design projects. He also does a brilliant job of integrating that stuff into the diagrams in his posts, which is why I paid attention when he put out a list (just take a look at his archives and you'll see what I mean).

As I was looking at those fonts and downloading them, I was thinking about sIFR, which I've mentioned before. It's a way to replace text in web pages with Flash on the fly, using fonts that aren't on a user's computer. I've wanted to include that on this site and on several others for quite a while.
Read the rest of this entry »

Writing My Own Travel Agent in C#

Jul
30
2008

Yesterday, Garrick was describing the difference between a "search result" and "find". His short answer was:

Search Results Listings say, 'The answer might be here'. Find says, 'Here you are, get on with your day.'”

That distinction is something that has always struck me as irritating about using every travel site I've ever seen (later discussion revealed that, ironically, this distinction is talked about obsessively at Orbitz). That irritation is because every search I've made started out as something that doesn't fit in their search boxes: "Find me a cheap coach flight and a hotel near the conference center in Austin, TX for SXSW", "I'd like to go to San Francisco for a long weekend some time this fall; is there a way to do that for under $500?" or "Which one of these cities and which weekend will be cheapest in October for a 5 day weekend?".

Those aren't questions which naturally get answered by a search results page. You don't get to pose those questions to travel sites. What you are asked on every one of them is to choose specific dates and, in many cases, both airports. The sites don't even so much as hold on to the fact that 99% of my travel is based out of Minneapolis/St. Paul International Airport.

Rather, I get a constant flow of emails from the travel engines telling me about great deals to Miami/Las Vegas/New York for $89. Of course, if you are flying out of Minneapolis, that deal suddenly becomes $327 instead.

There is a place you could and can ask those questions and get your "find" satisfied. Travel agents pick up the phone, listen to just such a question and call you back later in the day with the results of your find. Unfortunately, they also are professionals who need to make a living. That means they're not entirely thrilled to, for instance, check daily for weeks at a time for a very specific set of criteria for a vacation I may take if the deal is good enough.

That does, however, smell of the kind of thing that I like sling a bit of code to solve. And, it's something I've wanted to solve for a very long time. Every couple of months, I go looking for a way to write code that searches for flights and hotels and have always come up empty.

Then, this weekend, I did it again and ran across the Kayak API, which looks like what I've been looking for all along. The API allows 1000 searches per day, per developer key. While that wouldn't let me create much of a public service or commercial application, it's a really roomy number if you're looking to do lots of permutations for your own travel needs.

Personally, I'd like to do things like have a list of cities I've never been to and have software grind away on it, finding a good deal for a "fall long weekend" or a "week-long summer vacation", etc. for one of those locations. Similarly, I'd like to be able to say, "I've got $300. Is there somewhere I can go and get a hotel for a 3 day weekend that's on my list?".

Software can easily handle digging through the tedious crap like seeing whether leaving on Thursday and coming back on Sunday is cheaper or more expensive than leaving on Friday and coming back on Monday. As a person, trying those combinations on the existing search results-oriented sites is tedious. Tedious is what software does best.

Before I start dreaming too big for what might be possible, I threw together a quick POC app to see how easy it might be to search and grab results. I created a really basic class library for doing the actual searches and a tiny console app to try out a single search.

I have to say, I like what I see and think that there are some real possibilities for coding up my own travel agent with Kayak.

The sample, half-finished POC code is available in PDF form if you want to look at it. It's got gaping holes all over (hard-coded, read-only properties, unused properties, concatenated strings, etc), but shows the basic idea for how to hit the service. This doesn't do anything to take advantage of any of the polling cycle that the API documentation describes, so the results are incomplete.

However, it proved what I wanted from the POC. I'm now pretty sure that I'll be able to get what I want out of that API. If you're interested in travel and writing software, it might be worth a look for you as well.

Getting Twhirl and Other Adobe AIR Apps Working on Ubuntu 64

Jul
14
2008

There's been some pretty fun and interesting stuff coming out of the Adobe AIR platform. I've tinkered with building some stuff on the platform myself, but most of my use of AIR-related has been using the wide array of Twitter apps. That's probably the biggest category of AIR apps at the moment.

I've been using Twhirl pretty heavily and prefer it to the web interfaces. However, while Twhirl and AIR run on my Windows boxes and my Mac, my primary laptop/workstation runs Ubuntu, which isn't a first class citizen in the AIR world.

I like to have the same tools available on all of my workstations whenever possible. So, when an alpha for Linux was announced, I took note, planning to get it installed when I got a chance.

Just before I left for Ireland, I gave it a shot, downloading the .bin file, running it and getting about half way through the installer before the install dying. I looked up the error only to find that I was out of luck. While Adobe supports many Linux distributions, including the one I use, what it *doesn't* support is the 64 bit version that I'm running.

So, today at lunch, I went looking for a way to get it running, despite Adobe's lack of support. So many of the apps that claim not to work on 64 bit Linux actually work just fine if you do it right.

What I found on several sites all boiled down to the same answer/solution. There are some glitches that are kind of a pain (like Twhirl not saving my passwords), but I've got Twhirl running on Ubuntu 64. Here's how to do it.
Read the rest of this entry »

« Older Entries  

J Wynia

For better or worse, I'm the guy who runs things here. I'm a web consultant, software developer, writer and geek from Minneapolis, MN. This site is a fairly wide cross-section of the things I'm interested in and enjoy writing about.

Oh, and if you happen to be looking for hosting for your Subversion repositories or just web hosting in general, take a look at Dreamhost. It's what I use for Subversion and your signup helps me out.

Feeds and Links


www.flickr.com
This is a Flickr badge showing public photos from J Wynia. Make your own badge here.

Search


Pages

Archives

Computers Blog Directory
© 2003-2009 J Wynia. All original content is licensed under the terms of the Creative Commons Attribution license unless otherwise noted. Content from other sources is licensed under its original terms.