Show More
@@ -1,20 +1,27 | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | # |
|
2 | # | |
3 | # mercurial - scalable distributed SCM |
|
3 | # mercurial - scalable distributed SCM | |
4 | # |
|
4 | # | |
5 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
|
5 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> | |
6 | # |
|
6 | # | |
7 | # This software may be used and distributed according to the terms |
|
7 | # This software may be used and distributed according to the terms | |
8 | # of the GNU General Public License, incorporated herein by reference. |
|
8 | # of the GNU General Public License, incorporated herein by reference. | |
9 |
|
9 | |||
10 | # enable importing on demand to reduce startup time |
|
10 | # enable importing on demand to reduce startup time | |
|
11 | try: | |||
11 | from mercurial import demandimport; demandimport.enable() |
|
12 | from mercurial import demandimport; demandimport.enable() | |
|
13 | except ImportError: | |||
|
14 | import sys | |||
|
15 | sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" % | |||
|
16 | ' '.join(sys.path)) | |||
|
17 | sys.stderr.write("(check your install and PYTHONPATH)\n") | |||
|
18 | sys.exit(-1) | |||
12 |
|
19 | |||
13 | import sys |
|
20 | import sys | |
14 | import mercurial.util |
|
21 | import mercurial.util | |
15 | import mercurial.dispatch |
|
22 | import mercurial.dispatch | |
16 |
|
23 | |||
17 | for fp in (sys.stdin, sys.stdout, sys.stderr): |
|
24 | for fp in (sys.stdin, sys.stdout, sys.stderr): | |
18 | mercurial.util.set_binary(fp) |
|
25 | mercurial.util.set_binary(fp) | |
19 |
|
26 | |||
20 | mercurial.dispatch.run() |
|
27 | mercurial.dispatch.run() |
General Comments 0
You need to be logged in to leave comments.
Login now