Mercurial > public > mercurial-scm > hg
comparison mercurial/chgserver.py @ 39808:1b9be0b26511 stable
chgserver: update comment describing when to fall back to core _runsystem()
The condition "output needs to be captured" was moved to the core ui, and
removed at fbce78c58f1e "chg: refactor ui.system() to be partly overridden."
The next patch will add one more "if" to address the issue 5992.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 26 Sep 2018 21:21:05 +0900 |
parents | a8a902d7176e |
children | 23a00bc90a3c |
comparison
equal
deleted
inserted
replaced
39807:e5724be689b3 | 39808:1b9be0b26511 |
---|---|
196 self._csystem = getattr(src, '_csystem', csystem) | 196 self._csystem = getattr(src, '_csystem', csystem) |
197 else: | 197 else: |
198 self._csystem = csystem | 198 self._csystem = csystem |
199 | 199 |
200 def _runsystem(self, cmd, environ, cwd, out): | 200 def _runsystem(self, cmd, environ, cwd, out): |
201 # fallback to the original system method if the output needs to be | 201 # fallback to the original system method if |
202 # captured (to self._buffers), or the output stream is not stdout | 202 # a. the output stream is not stdout (e.g. stderr, cStringIO), |
203 # (e.g. stderr, cStringIO), because the chg client is not aware of | 203 # because the chg client is not aware of these situations and |
204 # these situations and will behave differently (write to stdout). | 204 # will behave differently (i.e. write to stdout). |
205 if (out is not self.fout | 205 if (out is not self.fout |
206 or not util.safehasattr(self.fout, 'fileno') | 206 or not util.safehasattr(self.fout, 'fileno') |
207 or self.fout.fileno() != procutil.stdout.fileno()): | 207 or self.fout.fileno() != procutil.stdout.fileno()): |
208 return procutil.system(cmd, environ=environ, cwd=cwd, out=out) | 208 return procutil.system(cmd, environ=environ, cwd=cwd, out=out) |
209 self.flush() | 209 self.flush() |