3 # mercurial - scalable distributed SCM
5 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
7 # This software may be used and distributed according to the terms of the
8 # GNU General Public License version 2, incorporated herein by reference.
10 # enable importing on demand to reduce startup time
12 from mercurial import demandimport; demandimport.enable()
15 sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" %
17 sys.stderr.write("(check your install and PYTHONPATH)\n")
20 # PLAN9 hack to keep hgrc in $home/lib
22 os.environ['HGRCPATH']=os.environ['home']+'/lib/hgrc'
26 import mercurial.dispatch
28 for fp in (sys.stdin, sys.stdout, sys.stderr):
29 mercurial.util.set_binary(fp)
31 mercurial.dispatch.run()