I finally wanted to make hg view work.
Today I wanted to use it though!
Here's how to get it to work:
Download and install a new version of Mercurial using the link above.
Clone the Mercurial repository, then update it to the revision that you had just installed, and finally copy the hgk script to your personal bin directory:
$ hg clone http://selenic.com/hg hg-upstream $ hg up -r b7f44f01a632 $ cp hg-upstream/contrib/hgk ~/bin
You could also copy it to your system-wide bin directory:
$ sudo cp hg-upstream/contrib/hgk /usr/local/bin
Edit your ~/.hgrc file to turn on the extension and point it to the location of your hgk script:
[extensions] hgk= [hgk] path=/Users/myusername/bin/hgk
(If you copied it to your system-wide bin directory, use /usr/local/bin/hgk for the path value.)