MacHg 0.9.13 released!

MacHg 0.9.13 adds QuickLook support, error disclosures, .hgignore event handling, UI improvements, and fixes a number of issues.

In particular one can now use QuickLook to get a snapshot of the historical state of a file in the History View or the Differences View. This facet of QuickLook support is quite nice. In fact the general QuickLook support does all the things it should in the right mac ways, etc.

I also like the new error disclosures. They are much snazzier than the previous versions. (I even find myself every so often repeatedly typing in purposely wrong paths and names just so I can see them smoothly animate out in MacHg and think to myself “ohh, that really looks nice…” Then again I guess it’s only ever GUI designers who think such things, and normal people will just think “Oh… yes, I guess you are right, that does look nice.” But never really notice it otherwise… Still it’s details like this which make Mac applications, well Mac like…

Also a really nice change in MacHg 0.9.13 is that I can now get from Mercurial the regular expression representing all the files Mercurial will ignore. Before, whenever I auto-detected that something changed inside some directory (via FSEvents), I had to send through to Mercurial a request to see what had changed. However, if that directory was ignored by Mercurial, I would still have to go through the whole rigmarole of checking via Mercurial that indeed nothing had changed. Now I can just check against the regular expression, which is much faster. Eg a typical example of this is having an ignored build directory in your programming project. Typically though, when you are compiling the files inside in your project, often the files within the build directory are changing like mad.  Thus previously a flood of checks would have to go out from MacHg to Mercurial to see if anything changed, and this could in fact cause your build to go some 2 times slower than without MacHg running… Anyway happily this is now fixed.

Also I have gone with the new status icons provided by David Keegan. I think they are better than the ones I had. Also David sent along some new toolbar items and revamped the icons for the preferences items. (Thanks David!)

There are also a number of other UI fixes. See the full [release notes]:

In more general terms of the overall MacHg timeline, the change to stable graph drawing in 0.9.12 has gone very well. There has been only one reported issue against this massive refactor, and moreover that issue is now fixed in 0.9.13.  So all in all the huge refactor and speed up in 0.9.12 went very smoothly.

MacHg 0.9.13 is definitely a candidate for MacHg 1.0.0. (In fact MacHg 0.9.12 was also a candidate, but I just wanted to see that everything was ok with the stable graph drawing change.)

Beyond the 1.0.0 release I plan to add a super Annotation View, an improved history editing interface, handling for git and svn through their respective extensions, improved discovery and other issues.

Cheers, Jason

Leave a Comment

Where is NSBrowserSelectionDidChangeNotification when you need it?

While I was updating MacHg to include QuickLook support I came across the case where it would be really nice if NSBrowser had the notification NSBrowserSelectionDidChangeNotification (which doesn’t exist) whereas for comparison NSTableView has NSTableViewSelectionDidChangeNotification. There are a couple of hacks and ways to get around this, and MacHg currently updates more often than it should. Right now I just target the action to a method which always updates, but sometimes the selection updates when it doesn’t need to… Googling around for this, you can see various people searching for a solution… Eg here and here. Anyway, if anyone knows of a nice way to do this, please let me know!



Comments (1)

MacHg 0.9.12 released!

MacHg 0.9.12 adds stable graph drawing and large speed and optimization improvements to load times.

I missed releasing MacHg 0.9.12 on Christmas by a couple of days. (But of course family things took precedence and… well… I have had a fantastic Christmas.)

Anyway for all my users, your present is now available for download 🙂 …

I am quite happy that I have finally solved the graph jiggling problem. Although the changes required were huge, MacHg is definitely the better for it now. Actually, in general I am quite happy with MacHg 0.9.12, since I have managed to solve a number of tricky under the hood type problems in this release. Now I can get back to a few more UI sorts of issues and most importantly additions. (Full 0.9.12 release notes.)

MacHg 0.9.12 is almost a candidate for MacHg 1.0.0 but the refactor present in this release (0.9.12) is truly massive so some regression might have been accidentally introduced…

(The annotation view is the major feature planned for MacHg 1.1.0.)

Cheers, Jas

Leave a Comment

MacHg 0.9.11 released

Well that was quick. An configuration error crept into the release of MacHg 0.9.10 and so I have released MacHg 0.9.11 to resolve this issue.

The issue was that if people had previously used MacHg then in their ~/Application Support/MacHg/ folder there was a hgrc file that MacHg had previously installed. But this file was missing the cedit extension declaration. Fresh MacHg installs didn’t have this problem. Also if your ~/.hgrc has the cedit extension then this problem also didn’t show up.

In any case MacHg 0.9.11 solves this configuration problem. Grab a copy of MacHg 0.9.11 from the usual downloads page.



Leave a Comment

MacHg 0.9.10 released

I am happy to announce the release of MacHg 0.9.10!

MacHg 0.9.10 updates the underlying Mercurial version to 1.7.2 (The latest at this time.) MacHg 0.9.10 also includes various fixes for minor glitches (none of them too critical.) See the full release notes here.

Those people who downloaded the provisional 0.9.10 I released in this post should delete that version and get the official 0.9.10. (Although using the provisional 0.9.10 will not cause any problems whatsoever, it’s best to have everyone on the same page and there is one extra small bug fix to do with the cedit extension which is included in the official 0.9.10, as well the official MacHg 0.9.10 uses Mercurial 1.7.2 instead of Mercurial 1.7.1)

As always you can get the latest version from

Leave a Comment

MacHg 0.9.10 pre-released

Hi All,

Several people have now all stumbled upon the following problem: Mercurial 1.7 was updated and it includes a change where the repositories it creates by default are not backward compatible with earlier versions. Now that 1.7.1 has been out for a bit people are updating to the latest command line version of Mercurial. Now normally it’s perfectly fine to have an older version of Mercurial in MacHg. Normally I upgrade the version in MacHg in a staggered fashion due to bug testing and stability. (Also since it’s a Front end to Mercurial it doesn’t matter if a new feature is added to Mercurial proper since if an interface isn’t coded into MacHg then the feature is not used.) For a couple of weeks now the version I have used internally in my development has been 1.7.1. Thus due to this problem with version mismatch I am issuing a pre release of version MacHg 0.9.10 for those people who need it:

I would do this as a full release but unfortunately I am not in my home city in front of my home computer, thus the keys I use for Sparkle are not present on my machine. As soon as I get in front of my home machine I will issue an update that goes through sparkle. For now though use the link above. (Incidentally there are several non-critical fixes in 0.9.10 which you can peruse on the official bit bucket site.)

(Note, just in case you were wondering, trying to use MacHg 0.9.9 on a repository created by Mercurial 1.7+ will not in any way damage the repository, but it won’t work. To make it work use MacHg 0.9.10 above…)

Update: I have now officially released MacHg 0.9.10. So the pre-release version has been removed and replaced by the official version.



Comments (1)

MacHg 0.9.9 released!

I am really happy to announce MacHg 0.9.9.

Its getting really close to MacHg 1.0.0! Here is the release notes for MacHg 0.9.9

  • Major revamp of the Commit Sheet.
  • Files can now be excluded / re-included from the commit sheet, and visually disabled / enabled.
  • An expandable “Advanced Options” section is now accessible on the commit sheet. One can override the user or the date of a commit.
  • Introduce the “Amend Option”. Although Mercurial does not have a native command for this, MacHg uses Mercurial queues to do the amending of files. (this is the same as the git command.)
  • Fix a problem where if you click too quickly on a repository you get kicked back to the welcome screen instead of loading the repository.
  • Big internal enhancement to DisclosureBoxController so it shuffles views around better.
  • Add tooltip stating that the password will be stored securely in the system keychain.
  • Improve performance and avoid threading issues, by internally putting many events inside a delayEventsUntilFinishBlock.
  • Fix issue #110, where the times of commits would appear incorrectly offset by the local time zone.
  • Fix issues to do with date parsing. Ensures one gets the correct date when importing patches.
  • Make the rollback menu item disabled when there is no rollback information available.
  • Make sure the push / pull / incoming / outgoing counts are laid out correctly when resizing the corresponding sheet.
  • Fix issue #86. Previously, a collapse of multiple changesets would result in the historyView’s selected indices ‘sticking’ despite the collapse. Now, after a collapse, the ‘lower’ revision is selected.
  • Make the delete key in the ImportPatches sheet delete a patch from the list of patches we are about to import.
  • Fix for issue #126. Save the overall window size for non-independent window sizes.
  • Fix issue #96 : “Built-in” typo in the Preferences pane.
  • Remove unused “count”-string in PullSheet.
  • Fix issue #121. Corrected the documentation to use “Add Server” instead of “Bookmark Server”.
  • Fix issue #106. Generate a better name in the rename sheet and fix button layout.
  • Include nice addition from Eugene Golushkov to make parent revisions appear as buttons.
  • Also from Eugene Golushkov make the NSTextAttachments copy to the clipboard correctly.
  • Fix issue #114. Add a preference item to control if the views have independent window sizes. (Several people had previously asked for this option.)
  • Fix issue #113. Added a rebase option to pull sheet.
  • Fix issue #116 and #108. We can now ignore files with a ‘#’,’+’, or ‘*’ in them.
  • Fix pinning of the “Browse…” button in the local repository sheet.
  • Added some underlying support for undo /redo. The backup works perfectly, unfortunately it’s just too slow for large repositories like OpenOffice, so I will have to go with some plan B (but leave the functionality in for now…)
  • Add some documentation on the Help Generation process.
  • Add help topic about empty repositories. (Relates to issue #134).
  • Make building instructions for MacHg a little more prominent.
  • Document the simple instructions necessary to change the Mercurial binary used by MacHg in MacHg/CodeOverview.txt
  • Use only MacHg’s local Mercurial version and remove the preference item UseWhichMercurialBinary. It really makes no sense to allow the specification of a different Mercurial binary and it can only lead to problems. If the user wants to change the Mercurial version inside the MacHg bundle they can easily follow the documented instructions.
  • Simplify the include paths presented to the users in the advanced options. Previously it was a bit more general but users were getting confused. Thus Remove preference IncludeMacHgHgrcInHGRCPATH and always have the ~/Application Support/MacHg/hgrc file included in the HGRC path.
  • Make sure that the application support hgrc file contains a valid user name, so if the preferences are switched mid session then things still function correctly.
  • By default now include the users ~/.hgrc file in the HGRCPATH.
  • Make switching on the editing extensions in checkConfigFileForEditingExtensions check only in the ~/Application Support/MacHg/hgrc configuration file.
  • Fix issue #95. Check for the existence of a ~/.hgignore file on startup. If this file doesn’t exist then create it with the contents of DefaultFiles/hgignore.
  • Prevent #124 from happening.
  • Release version 0.9.9
  • Patch contributors for this release (Thank you all!): Eugene Golushkov, Sven Weidauer, Tojek Anselm, Marko Kaning

General status comment on MacHg: I am still working on the graph jiggling issue before I can finally go 1.0.0. ( It is my top priority but its quite hard to do since getting incremental child information is an n^2 thing. I have stuff working in my own private branch, and I will hopefully finish the polish on it and release it soon.

Comments (2)

MacHg Status

Hey all,

I just wanted to say that several people have been emailing me about MacHg and progress. As many of you have seen the public amount of work I have done on it has dropped off in the last number of months.

Well the explanation is simple my normal paying job right now is ramped up and so all my normal time (as always), is spent on that and in addition all the spare time that I can reasonably muster is also spent on that at the moment. Its really exciting stuff. In any case when that calms down in the near future I will be adding some features and polishing others in MacHg that I have long planned to do.

Top of the list is the “jiggling” of the graph as one scrolls… I actually have something working  internally but there are kinks to iron out. I rewrote things completely in MacHg only to find out that some child accessing is O(n^2). This was a real pain and I tried to get the Mercurial guys to have nice ways around this for GUI writers like me, but no dice. Thus I have had to work around this in a messy and un-ideal way. Still it working in my internal prototype builds.

Anyway more soon! I promise 🙂

Cheers,   Jas

Comments (2)

FileMerge and UTF-8

I really like apples FileMerge tool for comparing files but you can sometimes get problems when diffing files which are UTF-8. In fact when you have non-ascii characters, with eg umlauts or graves, etc the diff will look like it has garbage in it.  For background see this hint at Mac OSX Hints for a bit of background on this. Basically to make sure FileMerge does a nice diff on files which are UTF-8 encoded you need to set the extended attribute to be ‘UTF-8;134217984‘, and then your diffs will work correctly. I needed to solve this exact problem for MacHg. Thus a general diff script for whatever revision system which uses FileMerge should set this attribute correctly. Ie if you are using, git, subvbersion, Mercurial, bazzar, or anything else likely the script for diffing should be setting the text-encdoing extended attribute.

It can be done by adding the following script somewhere on your unix path Eg unzip and move this bash script to ~/bin/ (assuming this is on your $PATH). This is a typical filemaker diff script as you can find floating around, eg here.  However the important part of this script is at the end where we have:

# Find the extended attributes of the files
leftattributes=xattr -p "$leftfile" 2>/dev/null
rightattributes=xattr -p "$rightfile" 2>/dev/null

if the encodings are not UTF-8, then make them UTF-8

shopt -s nocasematch if [ -z "$leftattributes" ] || [ "$leftattributes" != "UTF-8;134217984" ]; then xattr -w "UTF-8;134217984" "$leftfile" fi if [ -z "$rightattributes" ] || [ "$rightattributes" != "UTF-8;134217984" ]; then xattr -w "UTF-8;134217984" "$rightfile" fi shopt -u nocasematch

This snipped of code above in the script ensures that the extended attribute is set on each of the files before they are diffed using apple’s opendiff which in turn calls FileMerge.

After is installed you can simply call fmdiff in exactly the same way as opendiff. Eg:

Leave a Comment

MacHg 0.9.7

Yesterday I launched MacHg 0.9.7. Its quite a nice release if I do say so myself. I am quickly closing in on 1.0.0 which I will announce to the world. (So far I have just announced these release on the Mercurial mailing lists, not version tracker, cnet, iusethis, etc.)

Only some more minor bug fixes remain, and there are no substantial problems I am aware of in the functionality of MacHg. Thats a good thing! I still of course have many plans for MacHg beyond 1.0, like hunk level control in the commit dialog and a staging area like gitx has. (I like this feature of gitx but maybe would like to be able to do this through a visual diff rather than just hunk control.) Also on the cards is drag and drop patch control, and annotation on steroids.

Comments (11)