Show More
@@ -1,6 +1,6 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | # |
|
2 | # | |
3 |
# Copyright 2005 |
|
3 | # Copyright 2005-2007 by Intevation GmbH <intevation@intevation.de> | |
4 | # Author(s): |
|
4 | # Author(s): | |
5 | # Thomas Arendsen Hein <thomas@intevation.de> |
|
5 | # Thomas Arendsen Hein <thomas@intevation.de> | |
6 | # |
|
6 | # | |
@@ -25,7 +25,7 b' You can use pattern matching of your nor' | |||||
25 | command="cd repos && hg-ssh user/thomas/* projects/{mercurial,foo}" |
|
25 | command="cd repos && hg-ssh user/thomas/* projects/{mercurial,foo}" | |
26 | """ |
|
26 | """ | |
27 |
|
27 | |||
28 |
from mercurial import |
|
28 | from mercurial import dispatch | |
29 |
|
29 | |||
30 | import sys, os |
|
30 | import sys, os | |
31 |
|
31 | |||
@@ -38,7 +38,7 b" if orig_cmd.startswith('hg -R ') and ori" | |||||
38 | path = orig_cmd[6:-14] |
|
38 | path = orig_cmd[6:-14] | |
39 | repo = os.path.normpath(os.path.join(cwd, os.path.expanduser(path))) |
|
39 | repo = os.path.normpath(os.path.join(cwd, os.path.expanduser(path))) | |
40 | if repo in allowed_paths: |
|
40 | if repo in allowed_paths: | |
41 |
|
|
41 | dispatch.dispatch(['-R', repo, 'serve', '--stdio']) | |
42 | else: |
|
42 | else: | |
43 | sys.stderr.write("Illegal repository %r\n" % repo) |
|
43 | sys.stderr.write("Illegal repository %r\n" % repo) | |
44 | sys.exit(-1) |
|
44 | sys.exit(-1) |
General Comments 0
You need to be logged in to leave comments.
Login now