Mac OS X に MacPorts 経由で Mercurial をインストールする

% port deps mercurial
mercurial has library dependencies on:
	python25
	py25-zlib
	py25-hashlib
	py25-bz2
% port variants mercurial
mercurial has the variants:
	bash_completion: Install mercurial bash-completion file
	zsh_completion: Install mercurial zsh completion file
% sudo port install mercurial
To fully complete your installation and make python 2.5 the default, please run

	sudo port install python_select  
	sudo python_select python25
% sudo port install python_select
% sudo python_select python25
Selecting version "python25" for python

バージョンを確認する

% hg --version
Mercurial - 分散構成管理ツール(バージョン 1.2.1)

Copyright (C) 2005-2009 Matt Mackall <mpm@selenic.com> and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ヘルプを表示させる

% hg help

ヘルプが日本語で表示される。

コマンドの詳細を表す

% hg -v

コマンドの詳細も日本語で表示された。

文字コードを確認する

% /opt/local/bin/python
Python 2.5.4 (r254:67916, May 13 2009, 23:16:14) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getpreferredencoding()
'X-MAC-JAPANESE'
>>> quit()