Show More
@@ -267,10 +267,7 b' def _newchgui(srcui, csystem):' | |||||
267 |
|
267 | |||
268 | return chgui(srcui) |
|
268 | return chgui(srcui) | |
269 |
|
269 | |||
270 |
def _loadnewui(srcui, args |
|
270 | def _loadnewui(srcui, args): | |
271 | if not args: |
|
|||
272 | args = [] |
|
|||
273 |
|
||||
274 | newui = srcui.__class__() |
|
271 | newui = srcui.__class__() | |
275 | for a in ['fin', 'fout', 'ferr', 'environ']: |
|
272 | for a in ['fin', 'fout', 'ferr', 'environ']: | |
276 | setattr(newui, a, getattr(srcui, a)) |
|
273 | setattr(newui, a, getattr(srcui, a)) | |
@@ -524,18 +521,9 b' class chgcmdserver(commandserver.server)' | |||||
524 | newenv = dict(s.split('=', 1) for s in l) |
|
521 | newenv = dict(s.split('=', 1) for s in l) | |
525 | except ValueError: |
|
522 | except ValueError: | |
526 | raise ValueError('unexpected value in setenv request') |
|
523 | raise ValueError('unexpected value in setenv request') | |
527 |
|
524 | _log('setenv: %r\n' % sorted(newenv.keys())) | ||
528 | diffkeys = set(k for k in set(os.environ.keys() + newenv.keys()) |
|
|||
529 | if os.environ.get(k) != newenv.get(k)) |
|
|||
530 | _log('change env: %r\n' % sorted(diffkeys)) |
|
|||
531 |
|
||||
532 | os.environ.clear() |
|
525 | os.environ.clear() | |
533 | os.environ.update(newenv) |
|
526 | os.environ.update(newenv) | |
534 |
|
||||
535 | if set(['HGPLAIN', 'HGPLAINEXCEPT']) & diffkeys: |
|
|||
536 | # reload config so that ui.plain() takes effect |
|
|||
537 | self.ui, _lui = _loadnewui(self.ui) |
|
|||
538 |
|
||||
539 | _clearenvaliases(commands.table) |
|
527 | _clearenvaliases(commands.table) | |
540 |
|
528 | |||
541 | capabilities = commandserver.server.capabilities.copy() |
|
529 | capabilities = commandserver.server.capabilities.copy() |
General Comments 0
You need to be logged in to leave comments.
Login now