git-dude, meet hg-dude
Tuesday, 11 October 2011
Git-dude is a cool little thing. Given a directory of git repos, it continually fetches updates and displays a popup if you get any new commits. When I first saw it on Google Plus, somebody inexplicably commented, “This is a neat thing and I dont [sic] think there is a mercurial equivalent.”
Given that Git and Mercurial are isometric for most intents and purposes, this baffled me. Clearly, this could not be some special Git-exclusive functionality. I dug into the git-dude source code and found out it was little more than a single bash script that pipes some git commands through sed and awk.
A few minutes later, I made hg-dude, which offers similar functionality for Mercurial. There’s a couple things that aren’t supported. Git-dude offered special notifications for tags and branches, and I didn’t translate them to Mercurial because the concepts, even though they have similar names, don’t quite match up. Regardless, it is still as useful as git-dude for commit notifications, which I expect is the primary usage.
Some may notice the irony of hosting a Mercurial tool on Github, but that was the easiest way to preserve its history from its git-dude days. Bitbucket fans can check out hg-dude’s Bitbucket repo.