##// END OF EJS Templates
serve: rename --daemon-pipefds to --daemon-postexec (BC)...
Jun Wu -
r28194:7623ba92 default
parent child Browse files
Show More
@@ -189,7 +189,7 b' static void execcmdserver(const struct c'
189 189 "--cwd", "/",
190 190 "--cmdserver", "chgunix",
191 191 "--address", opts->sockname,
192 "--daemon-pipefds", opts->lockfile,
192 "--daemon-postexec", opts->lockfile,
193 193 "--pid-file", opts->pidfile,
194 194 "--config", "extensions.chgserver=",
195 195 /* wrap root ui so that it can be disabled/enabled by config */
@@ -758,14 +758,14 b' def service(opts, parentfn=None, initfn='
758 758 fp.write(str(pid) + '\n')
759 759 fp.close()
760 760
761 if opts['daemon'] and not opts['daemon_pipefds']:
761 if opts['daemon'] and not opts['daemon_postexec']:
762 762 # Signal child process startup with file removal
763 763 lockfd, lockpath = tempfile.mkstemp(prefix='hg-service-')
764 764 os.close(lockfd)
765 765 try:
766 766 if not runargs:
767 767 runargs = util.hgcmd() + sys.argv[1:]
768 runargs.append('--daemon-pipefds=%s' % lockpath)
768 runargs.append('--daemon-postexec=%s' % lockpath)
769 769 # Don't pass --cwd to the child process, because we've already
770 770 # changed directory.
771 771 for i in xrange(1, len(runargs)):
@@ -798,8 +798,8 b' def service(opts, parentfn=None, initfn='
798 798 if not opts['daemon']:
799 799 writepid(util.getpid())
800 800
801 if opts['daemon_pipefds']:
802 lockpath = opts['daemon_pipefds']
801 if opts['daemon_postexec']:
802 lockpath = opts['daemon_postexec']
803 803 try:
804 804 os.setsid()
805 805 except AttributeError:
@@ -6208,7 +6208,7 b' def root(ui, repo):'
6208 6208 [('A', 'accesslog', '', _('name of access log file to write to'),
6209 6209 _('FILE')),
6210 6210 ('d', 'daemon', None, _('run server in background')),
6211 ('', 'daemon-pipefds', '', _('used internally by daemon mode'), _('FILE')),
6211 ('', 'daemon-postexec', '', _('used internally by daemon mode')),
6212 6212 ('E', 'errorlog', '', _('name of error log file to write to'), _('FILE')),
6213 6213 # use string type, then we can check if something was passed
6214 6214 ('p', 'port', '', _('port to listen on (default: 8000)'), _('PORT')),
@@ -38,7 +38,7 b" if __name__ == '__main__':"
38 38 parser.add_option('-f', '--foreground', dest='foreground',
39 39 action='store_true',
40 40 help='do not start the HTTP server in the background')
41 parser.add_option('--daemon-pipefds')
41 parser.add_option('--daemon-postexec')
42 42
43 43 (options, args) = parser.parse_args()
44 44
@@ -49,7 +49,7 b" if __name__ == '__main__':"
49 49
50 50 opts = {'pid_file': options.pid,
51 51 'daemon': not options.foreground,
52 'daemon_pipefds': options.daemon_pipefds}
52 'daemon_postexec': options.daemon_postexec}
53 53 service = simplehttpservice(options.host, options.port)
54 54 cmdutil.service(opts, initfn=service.init, runfn=service.run,
55 55 runargs=[sys.executable, __file__] + sys.argv[1:])
@@ -158,7 +158,7 b' Show the options for the "serve" command'
158 158 --config
159 159 --cwd
160 160 --daemon
161 --daemon-pipefds
161 --daemon-postexec
162 162 --debug
163 163 --debugger
164 164 --encoding
@@ -218,7 +218,7 b' Show all commands + options'
218 218 pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure
219 219 push: force, rev, bookmark, branch, new-branch, ssh, remotecmd, insecure
220 220 remove: after, force, subrepos, include, exclude
221 serve: accesslog, daemon, daemon-pipefds, errorlog, port, address, prefix, name, web-conf, webdir-conf, pid-file, stdio, cmdserver, templates, style, ipv6, certificate
221 serve: accesslog, daemon, daemon-postexec, errorlog, port, address, prefix, name, web-conf, webdir-conf, pid-file, stdio, cmdserver, templates, style, ipv6, certificate
222 222 status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, change, include, exclude, subrepos, template
223 223 summary: remote
224 224 update: clean, check, date, rev, tool
General Comments 0
You need to be logged in to leave comments. Login now