comparison mercurial/chgserver.py @ 50902:defd2b3eafdb

mq: use sysstr to check for attribute access We do not need bytes here.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 31 Aug 2023 16:57:16 +0200
parents b0e3f1508a25
children d718eddf01d9
comparison
equal deleted inserted replaced
50901:6543469a351e 50902:defd2b3eafdb
258 258
259 def _loadnewui(srcui, args, cdebug): 259 def _loadnewui(srcui, args, cdebug):
260 from . import dispatch # avoid cycle 260 from . import dispatch # avoid cycle
261 261
262 newui = srcui.__class__.load() 262 newui = srcui.__class__.load()
263 for a in [b'fin', b'fout', b'ferr', b'environ']: 263 for a in ['fin', 'fout', 'ferr', 'environ']:
264 setattr(newui, a, getattr(srcui, a)) 264 setattr(newui, a, getattr(srcui, a))
265 if util.safehasattr(srcui, '_csystem'): 265 if util.safehasattr(srcui, '_csystem'):
266 newui._csystem = srcui._csystem 266 newui._csystem = srcui._csystem
267 267
268 # command line args 268 # command line args
346 raise error.ProgrammingError(b'invalid S channel type: %s' % type) 346 raise error.ProgrammingError(b'invalid S channel type: %s' % type)
347 347
348 348
349 _iochannels = [ 349 _iochannels = [
350 # server.ch, ui.fp, mode 350 # server.ch, ui.fp, mode
351 (b'cin', b'fin', 'rb'), 351 ('cin', 'fin', 'rb'),
352 (b'cout', b'fout', 'wb'), 352 ('cout', 'fout', 'wb'),
353 (b'cerr', b'ferr', 'wb'), 353 ('cerr', 'ferr', 'wb'),
354 ] 354 ]
355 355
356 356
357 class chgcmdserver(commandserver.server): 357 class chgcmdserver(commandserver.server):
358 def __init__( 358 def __init__(