MacHg icon

About MacHg

MacHg is a free open source OSX GUI for the distributed revision control system Mercurial. This allows you in a nice graphical way to manage a collection of files, to add things to the collection, to save a snapshot of the collection, to restore the collection to an earlier state and in general to work with the files. In my humble opinion it's the best Mercurial client for OSX.

Some of the Features of MacHg

Revision control: Mercurial is a distributed version control system. Distributed Revision Control Systems (DVCS's) are a relatively new development in the overall class of revision control systems, and Mercurial is one of the leading systems in this new class of revision control systems. For more on Mercurial see: Definitive Guide : revision control primer. Other modern distributed revision control systems are git and bazaar. You can obtain commercial support for Mercurial and MacHg if needed.

Document based structure: MacHg uses the standard left sidebar model you see in Mail, or iCal, or other Macintosh applications. This allows you to collect and group repositories and servers into the structure you want.

Status at a glance: When you select a repository all related repositories and servers will report the number of incoming and outgoing changes relative to the selected repository. This allows you at a glance to see the number of changes this repository has with respect to the other repositories.

Auto refreshes: When working with a repository any changes to the files in the repository or to the repository itself are automatically detected using apples FSFileEvents. This means the status of the repository and its tracked files when they change on your computer are automatically reflected inside MacHg.

Incremental loading of history: MacHg will incrementally load the changeset history in chunks. Thus updates are super speedy since they don't need to pull in the entire changeset history in a single hit. (It's of course more complicated internally to manage this incremental loading, which is why some lesser clients are brought to their knees when they load the entire history at once. Not so with MacHg.)

Industrial Strength: Because MacHg was written from the ground up to work in an incremental way and coded using multithreaded programming to take advantage of the full power of your Macintosh, MacHg can easily work with large repositories. For instance MacHg can easily work with the Mozilla repository which is around 3.35 Gb in size.

Command Line Compatible: MacHg is fully compatible with the use of Mercurial from the command line. Any changes you make to the repository are reflected inside MacHg due to the auto-refreshing of detected changes.

Mercurial Included: MacHg includes a full and functioning copy of Mercurial built into the application. This means you don't need to install the command line version at all. Just install MacHg by drag and drop anywhere you want and you are good to go. Moreover, if you install a different version of Mercurial on your machine it will in no way conflict with the version of Mercurial included with MacHg.

Multithreading Goodness: MacHg was written from the ground up using Apple's Grand Central Dispatch technology. This means MacHg can make use of all the cores of the processors in your machine in an efficient way. Importantly, this also means that the UI of MacHg will be fast and responsive.

Browser View: The file view interface of MacHg uses a "browser" approach just like the OSX finder. In the browser view you can see at a glance the "stacked" status of the enclosed items so you can tell what type of changes have occurred within the sub folders. Moreover you can "drill down" just like in the finder to view changes in sub folders with ease.

History View: You can examine the log or history of the changesets in the repository through the History View and from here use execute specific operations on changesets of your choosing. The History View provides a "stable" graph as you scroll through the changesets so its easy to track merges and branchings. You can easily examine the details of each changeset including author, date, full commit message, labels (if any), and modified files. You can easily diff all (or a selected subset) of the files in a changeset. You can narrow down the number of changesets displayed by searching on keywords. You can in short interact fully with the history of the repository.

Differences View: You can examine the differences between two chosen revisions easily through the Differences View. Often after a sequence of commits, a group of files might change in a variety of ways and its important to be able to see a collected view of the overall net changes from this sequence of changesets. The Differences View provides these changes through a virtual browser where you can diff or interact with the selected files you want.

Connect: You can of course interact with other repositories by pushing, pulling, cloning, or viewing incoming or outgoing changes to other repositories. Each of these connectivity functions brings up a tailored sheet where the available destinations are automatically populated by compatible destinations.

Full Interface: In MacHg there are multiple ways to interact with your repositories and files including: menu items, contextual menu items, drag and drop, shortcuts, and toolbar items. Often these bring up tailored sheets or directly execute the requested action. In fact MacHg has tailored interfaces for: committing, pushing, pulling, incoming, outgoing, cloning, annotating, renaming, merging, updating, reverting, adding files, removing files, exporting patches, importing patches, adding repositories, initializing repositories, and much more.

QuickLook: MacHg supports quick look in all the main views. In the History View and differences view you can examine snapshots of past revisions.

Labeling: MacHg provides an interface to global tags, local tags, bookmarks, and branches. In many appropriate places inside MacHg there are drop down menus where you can choose to go directly to a named revision. Moreover in the History View you can interact with the Labels subview to move labels around, add labels, or delete labels.

Rewrite History: With history editing you can clean up sequences of changesets, grouping and rearranging the related parts into an order which makes coherent sense after the fact. (Since lets face, it development is an often organic process and its nice to prune dead ideas at some stages.) MacHg provides an intuitive interface to Mercurial's history editing extensions. You can collapse, rebase, strip, or reorder and rearrange* changesets (*via histedit).

Patches: WIth MacHg you can easily create sequence of patches to share with other people or import a sequence of patches into you current repository. Sometimes this is quite useful to transplant changesets between one repository and another, or to send changes to colleagues.

Diffing: Viewing the differences in files is a cornerstone of revision control systems and in MacHg you can do it with ease. By default MacHg uses Apple's own FileMerge to view the diffs but you can easily change this diffing tool to be any of the other popular difference viewing tools such as AraxisMerge, kdiff3, DiffMerge, Changes, Kaleidoscope, etc. Moreover you can view all the differences in a changeset by just double clicking the changeset or directory. (But of course its configurable in the preferences.)

Sparkle: MacHg stays up to date by using the sparkle framework to automatically check for updates and, if you choose, update itself in a clean and simple manner.


MacHg is currently very stable and many users worldwide are currently using MacHg in a production setting to fulfill their needs of a GUI interface to Mercurial on OSX. However, there are currently several future additions planned for MacHg. A rough roadmap of additions is outlined here.

Jason F Harris ©2010, ©2011