# HG changeset patch # User Siddharth Agarwal # Date 1380748826 25200 # Node ID 993b2448867994252aebdc0ed04e69572d57e811 # Parent ba6577a196560d4a2925fc844520d75dedb28861 inotify: add pidfile to parent options An upcoming patch will move pidfile writing from the parent to the child. This means that if the pid file isn't specified on the command-line but is specified as a config option, it needs to be added to the parent's opts dict. diff -r ba6577a19656 -r 993b24488679 hgext/inotify/server.py --- a/hgext/inotify/server.py Wed Oct 02 22:46:32 2013 +0100 +++ b/hgext/inotify/server.py Wed Oct 02 14:20:26 2013 -0700 @@ -451,7 +451,9 @@ runargs = util.hgcmd() + sys.argv[1:] pidfile = ui.config('inotify', 'pidfile') - if opts['daemon'] and pidfile is not None and 'pid-file' not in runargs: + opts.setdefault('pid_file', '') + if opts['daemon'] and pidfile is not None and not opts['pid_file']: + opts['pid_file'] = pidfile runargs.append("--pid-file=%s" % pidfile) service = service()