cutehg in OSX
Table of Contents
UPDATE: murky native osx mercurial client is out
sed -i '' -e 's/port:tk//' /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/python26/Portfile
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.
wget http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.4.4.tar.gz
tar xzvf PyQt-mac-gpl-4.4.4.tar.gz
cd PyQt-mac-gpl-4.4.4
python2.6 ./configure.py -q /Developer/Tools/Qt/qmake
make install
hg clone http://bitbucket.org/bfrog/cutehg-stable/
cd cutehg-stable
python2.6 setup.py 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:
python2.6
>>> import sys
>>> sys.getdefaultencoding()
'ascii'
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/sitecustomize.py
What i don’t really get is why python won’t just use my LC_LOCALE/ALL but whatever.
HTH