#!/usr/bin/env python
# (Be in -*- python -*- mode.)
#
# ====================================================================
# Copyright (c) 2000-2008 CollabNet.  All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.  The terms
# are also available at http://subversion.tigris.org/license-1.html.
# If newer versions of this license are posted there, you may use a
# newer version instead, at your option.
#
# This software consists of voluntary contributions made by many
# individuals.  For exact contribution history, see the revision
# history and logs, available at http://cvs2svn.tigris.org/.
# ====================================================================

import sys

import os
try:
    import mercurial
    from mercurial import context, __version__
    # Some additional sanity checks are in hg_output_option.py
except ImportError:
    sys.stderr.write("ERROR: cvs2hg requires Mercurial (available as API module).")
    sys.exit(1)

from cvs2hg_lib.common import FatalException
from cvs2hg_lib.main import hg_main

try:
    hg_main(os.path.basename(sys.argv[0]), sys.argv[1:])
except FatalException as err:
    sys.stderr.write(str(err) + '\n')
    sys.exit(1)


