For PHP development, I use Netbeans with revision control handled by its built-in Mercurial integration.

Since installing Mountain Lion the other day, the Mercurial function of Netbeans had not been working. I did not see any errors, just a lack of any existing revisions to revert to or branches to switch to etc. Meanwhile MacHG still saw my repository suggesting that the problem was with the Netbeans side of things, not the repo.

It turns out that Apple in their infinite wisdom updated/removed mercurial in Mountain Lion. If I ever used Mercurial from the command line, I’d know this:

$ hg abort: couldn’t find mercurial libraries in [/Library/Python/2.7/site-packages/ /usr/local/bin /System/Library/Frameworks/Python.framework/Versions/2.7/lib/ /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC /Library/Python/2.7/site-packages] (check your install and PYTHONPATH)

Luckily there is a new Mercurial package for Mountain lion. Unfortunately due to the lack of an error from Netbeans stating that it could not find a Mercurial binary, I did not realise immediately what the problem was. There is also little mention of it online due to the issue being rather obvious to anyone who uses the cli interface for Mercurial, hence my writing this.

Thanks to Tobias Mühlbauer on whose blog I originally found the solution.

Leave a Reply

Your email address will not be published. Required fields are marked *