cutehg in OSX

UPDATE: murky native osx mercurial client is out

sed -i '' -e 's/port:tk//' /opt/local/var/macports/sources/

sudo port install python26
sudo port install py26-sip

Pyqt4 seemed to have problems with qt4.5 so I installed it with the QT available from the Trolltech website.

tar xzvf PyQt-mac-gpl-4.4.4.tar.gz
cd PyQt-mac-gpl-4.4.4
python2.6 ./ -q /Developer/Tools/Qt/qmake
make install

hg clone
cd cutehg-stable
python2.6 install

After you install everything you might get an annoying bug looking as follows while using the annotate or history command:

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) pyqt4

checking the python shell gives this:

>>> import sys
>>> sys.getdefaultencoding()

This is easily fixed by doing:

echo "import sys
sys.setdefaultencoding('utf-8')" > /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/

What i don’t really get is why python won’t just use my LC_LOCALE/ALL but whatever.


blog comments powered by Disqus
 Scroll to top