##// END OF EJS Templates
demandimport: disable if chg is being used...
Jun Wu -
r33862:3cfc9070 default
parent child Browse files
Show More
@@ -73,5 +73,7 b' disable = demandimport.disable'
73 deactivated = demandimport.deactivated
73 deactivated = demandimport.deactivated
74
74
75 def enable():
75 def enable():
76 if os.environ.get('HGDEMANDIMPORT') != 'disable':
76 # chg pre-imports modules so do not enable demandimport for it
77 if ('CHGINTERNALMARK' not in os.environ
78 and os.environ.get('HGDEMANDIMPORT') != 'disable'):
77 demandimport.enable()
79 demandimport.enable()
@@ -565,8 +565,11 b' class chgunixservicehandler(object):'
565 self._hashstate, self._baseaddress)
565 self._hashstate, self._baseaddress)
566
566
567 def chgunixservice(ui, repo, opts):
567 def chgunixservice(ui, repo, opts):
568 # CHGINTERNALMARK is temporarily set by chg client to detect if chg will
568 # CHGINTERNALMARK is set by chg client. It is an indication of things are
569 # start another chg. drop it to avoid possible side effects.
569 # started by chg so other code can do things accordingly, like disabling
570 # demandimport or detecting chg client started by chg client. When executed
571 # here, CHGINTERNALMARK is no longer useful and hence dropped to make
572 # environ cleaner.
570 if 'CHGINTERNALMARK' in encoding.environ:
573 if 'CHGINTERNALMARK' in encoding.environ:
571 del encoding.environ['CHGINTERNALMARK']
574 del encoding.environ['CHGINTERNALMARK']
572
575
General Comments 0
You need to be logged in to leave comments. Login now