#!/opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
#
# mercurial - scalable distributed SCM
#
# Copyright 2005-2007 Olivia Mackall <olivia@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

import os
import sys

try:
    from hgdemandimport import tracing
except ImportError:
    sys.stderr.write(
        "abort: couldn't find mercurial libraries in [%s]\n"
        % ' '.join(sys.path)
    )
    sys.stderr.write("(check your install and PYTHONPATH)\n")
    sys.exit(-1)

with tracing.log('hg script'):
    # enable importing on demand to reduce startup time
    import hgdemandimport

    hgdemandimport.enable()

    from mercurial import dispatch

    dispatch.run()
