Mimsy Were the Borogoves

Hacks: Articles about programming in Python, Perl, PHP, and whatever else I happen to feel like hacking at.

42 Astoundingly Useful Scripts and Automations for the Macintosh

Work faster and more reliably. Add actions to the services menu and the menu bar, create drag-and-drop apps to make your Macintosh play music, roll dice, and talk. Create ASCII art from photos. There’s a script for that in 42 Astounding Scripts for the Macintosh.

Murky for Mercurial

Jerry Stratton, May 4, 2010

I’ve been using Murky and Mercurial for the last month for my personal programming projects. Murky is an easy-to-use GUI for the command-line Mercurial source control system. It’s been a big help. Version control isn’t just for groups; it also helps you track changes and isolate changes in your own purely local code.

It works great for any text-oriented “code”, including CSS and HTML; for my Django project, I include both of those as part of the repository.

Currently you need to install both Mercurial and Murky, but both have Mac OS X installers. It also requires Python 2.4 or later, but if you are using 10.5 (Leopard) or 10.6 (Snow Leopard) you have that by default.

Murky is like the Smultron of version control GUIs. It makes it easy to use, easy to browse, and easy to maintain. Even if you’re only using CSS and never want to touch the command line, you can use Murky to manage your changes.


The pink text marks lines that were deleted, and the green text marks lines that were added. This makes it very easy to go back and see what changes I made at any time—and even revert to that version if necessary.

All you need to do after you install Mercurial and Murky is go into

You will probably want to add a .hgignore file to ignore all of the .DS_Store files that get added by the Mac OS when you open a folder or change its view preferences.

You can use a text editor to create a .hgrc file in your home directory:

  • [ui]
  • username=Your Name <youraddress@example.com>
  • ignore=~/.hgignore

Then put all of the items you want to ignore in a file called “.hgignore” in your home directory, alongside the .hgrc file:

  • .DS_Store

If you’re using Python, you might also want to ignore .pyc files. You can add a “glob” section to use file system wildcards. For example:

  • .DS_Store
  • syntax: glob
  • *.pyc

If you don’t ignore those files, Mercurial will assume you want to know when they change. And normally you don’t.

Once you’ve done that, you can use the “Open…” item under the “Repository” menu to start using Mercurial with one of your projects. Open the main folder of the project, and Murky will ask if you want to create a new repository. Say yes, then “Commit” the initial state (using the “Commit” button).

Then, every time you finish a set of changes, commit them. You can commit individual files or every changed file (“Commit All”). Browse through your revisions when you want to go backwards to see what the files used to look like; you can even open an individual file in a special window to scroll through the changes, watching your code change over time.

It’s a very useful addition to any project involving text files.

  1. <- Maven: SQLite front end
  2. Command-line mail ->