Show More
@@ -13,6 +13,7 b' import socket' | |||||
13 | import sys |
|
13 | import sys | |
14 |
|
14 | |||
15 | from mercurial import ( |
|
15 | from mercurial import ( | |
|
16 | pycompat, | |||
16 | server, |
|
17 | server, | |
17 | util, |
|
18 | util, | |
18 | ) |
|
19 | ) | |
@@ -63,10 +64,12 b" if __name__ == '__main__':" | |||||
63 | if options.foreground and options.pid: |
|
64 | if options.foreground and options.pid: | |
64 | parser.error("options --pid and --foreground are mutually exclusive") |
|
65 | parser.error("options --pid and --foreground are mutually exclusive") | |
65 |
|
66 | |||
66 | opts = {'pid_file': options.pid, |
|
67 | opts = {b'pid_file': options.pid, | |
67 | 'daemon': not options.foreground, |
|
68 | b'daemon': not options.foreground, | |
68 | 'daemon_postexec': options.daemon_postexec} |
|
69 | b'daemon_postexec': options.daemon_postexec} | |
69 | service = simplehttpservice(options.host, options.port) |
|
70 | service = simplehttpservice(options.host, options.port) | |
|
71 | runargs = [sys.executable, __file__] + sys.argv[1:] | |||
|
72 | runargs = [pycompat.fsencode(a) for a in runargs] | |||
70 | server.runservice(opts, initfn=service.init, runfn=service.run, |
|
73 | server.runservice(opts, initfn=service.init, runfn=service.run, | |
71 | logfile=options.logfile, |
|
74 | logfile=options.logfile, | |
72 |
runargs= |
|
75 | runargs=runargs) |
General Comments 0
You need to be logged in to leave comments.
Login now