dispatch: extract common logic for handling ParseError
The way ParseError is handled at two different places in dispatch.py is the
same. Move common logic into _formatparse.
to build a new macosx binary package:
install macpython from http://www.python.org/download/mac
install py2app from http://pythonmac.org/packages/
make sure /usr/local/bin is in your path
run bdist_mpkg in top-level hg directory
find packaged stuff in dist directory