comparison hgext/chgserver.py @ 30507:dd539e2d89aa

server: move service table and factory from commandserver This is necessary to solve future dependency cycle between commandserver.py and chgserver.py. 'cmd' prefix is added to table and function names to avoid conflicts with hgweb.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 15 Oct 2016 13:57:17 +0900
parents 39d13b8c101d
children 1873563e1ede
comparison
equal deleted inserted replaced
30506:d9d8d78e6bc9 30507:dd539e2d89aa
58 commandserver, 58 commandserver,
59 dispatch, 59 dispatch,
60 error, 60 error,
61 extensions, 61 extensions,
62 osutil, 62 osutil,
63 server,
63 util, 64 util,
64 ) 65 )
65 66
66 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for 67 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
67 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should 68 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
633 ui.setconfig('bundle', 'mainreporoot', '', 'repo') 634 ui.setconfig('bundle', 'mainreporoot', '', 'repo')
634 h = chgunixservicehandler(ui) 635 h = chgunixservicehandler(ui)
635 return commandserver.unixforkingservice(ui, repo=None, opts=opts, handler=h) 636 return commandserver.unixforkingservice(ui, repo=None, opts=opts, handler=h)
636 637
637 def uisetup(ui): 638 def uisetup(ui):
638 commandserver._servicemap['chgunix'] = chgunixservice 639 server._cmdservicemap['chgunix'] = chgunixservice
639 640
640 # CHGINTERNALMARK is temporarily set by chg client to detect if chg will 641 # CHGINTERNALMARK is temporarily set by chg client to detect if chg will
641 # start another chg. drop it to avoid possible side effects. 642 # start another chg. drop it to avoid possible side effects.
642 if 'CHGINTERNALMARK' in os.environ: 643 if 'CHGINTERNALMARK' in os.environ:
643 del os.environ['CHGINTERNALMARK'] 644 del os.environ['CHGINTERNALMARK']