##// END OF EJS Templates
chgserver: implement chgui._runpager...
Jun Wu -
r30740:493935e0 default
parent child Browse files
Show More
@@ -211,7 +211,7 b' def _setuppagercmd(ui, options, cmd):'
211 ui.setconfig('ui', 'interactive', False, 'pager')
211 ui.setconfig('ui', 'interactive', False, 'pager')
212 return p
212 return p
213
213
214 def _newchgui(srcui, csystem):
214 def _newchgui(srcui, csystem, attachio):
215 class chgui(srcui.__class__):
215 class chgui(srcui.__class__):
216 def __init__(self, src=None):
216 def __init__(self, src=None):
217 super(chgui, self).__init__(src)
217 super(chgui, self).__init__(src)
@@ -241,6 +241,10 b' def _newchgui(srcui, csystem):'
241 raise onerr(errmsg)
241 raise onerr(errmsg)
242 return rc
242 return rc
243
243
244 def _runpager(self, cmd):
245 self._csystem(cmd, util.shellenviron(), type='pager',
246 cmdtable={'attachio': attachio})
247
244 return chgui(srcui)
248 return chgui(srcui)
245
249
246 def _loadnewui(srcui, args):
250 def _loadnewui(srcui, args):
@@ -335,7 +339,8 b' class channeledsystem(object):'
335 class chgcmdserver(commandserver.server):
339 class chgcmdserver(commandserver.server):
336 def __init__(self, ui, repo, fin, fout, sock, hashstate, baseaddress):
340 def __init__(self, ui, repo, fin, fout, sock, hashstate, baseaddress):
337 super(chgcmdserver, self).__init__(
341 super(chgcmdserver, self).__init__(
338 _newchgui(ui, channeledsystem(fin, fout, 'S')), repo, fin, fout)
342 _newchgui(ui, channeledsystem(fin, fout, 'S'), self.attachio),
343 repo, fin, fout)
339 self.clientsock = sock
344 self.clientsock = sock
340 self._oldios = [] # original (self.ch, ui.fp, fd) before "attachio"
345 self._oldios = [] # original (self.ch, ui.fp, fd) before "attachio"
341 self.hashstate = hashstate
346 self.hashstate = hashstate
General Comments 0
You need to be logged in to leave comments. Login now