hg
27 lines
| 787 B
| text/plain
|
TextLexer
mpm@selenic.com
|
r0 | #!/usr/bin/env python | ||
# | ||||
Matt Mackall
|
r1698 | # mercurial - scalable distributed SCM | ||
mpm@selenic.com
|
r0 | # | ||
Thomas Arendsen Hein
|
r4635 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> | ||
mpm@selenic.com
|
r0 | # | ||
Martin Geisler
|
r8225 | # This software may be used and distributed according to the terms of the | ||
# GNU General Public License version 2, incorporated herein by reference. | ||||
mpm@selenic.com
|
r0 | |||
Thomas Arendsen Hein
|
r5197 | # enable importing on demand to reduce startup time | ||
Matt Mackall
|
r7672 | try: | ||
from mercurial import demandimport; demandimport.enable() | ||||
except ImportError: | ||||
import sys | ||||
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) | ||||
Thomas Arendsen Hein
|
r5197 | |||
Patrick Mezard
|
r5531 | import sys | ||
import mercurial.util | ||||
Matt Mackall
|
r5178 | import mercurial.dispatch | ||
Patrick Mezard
|
r5531 | |||
for fp in (sys.stdin, sys.stdout, sys.stderr): | ||||
mercurial.util.set_binary(fp) | ||||
Matt Mackall
|
r5178 | mercurial.dispatch.run() | ||