Mercurial > public > mercurial-scm > hg-stable
diff tests/dummysmtpd.py @ 30515:d9d8d78e6bc9
server: move cmdutil.service() to new module (API)
And call it runservice() because I'll soon add createservice().
The main reason I'm going to introduce the 'server' module is to solve
future dependency cycle between chgserver.py and commandserver.py.
The 'server' module sits at the same layer as the cmdutil. I believe it's
generally good to get rid of things from the big cmdutil module.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 15 Oct 2016 13:47:43 +0900 |
parents | 1b8b6adb2365 |
children | d83ca854fa21 |
line wrap: on
line diff
--- a/tests/dummysmtpd.py Wed Aug 17 20:41:05 2016 -0700 +++ b/tests/dummysmtpd.py Sat Oct 15 13:47:43 2016 +0900 @@ -11,7 +11,7 @@ import sys from mercurial import ( - cmdutil, + server, sslutil, ui as uimod, ) @@ -75,8 +75,8 @@ dummysmtpsecureserver(addr, opts.certificate) log('listening at %s:%d\n' % addr) - cmdutil.service(vars(opts), initfn=init, runfn=run, - runargs=[sys.executable, __file__] + sys.argv[1:]) + server.runservice(vars(opts), initfn=init, runfn=run, + runargs=[sys.executable, __file__] + sys.argv[1:]) if __name__ == '__main__': main()